mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Replacing deprecated code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13750 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
66a9c0b6ac
commit
ba61372f97
98
ChangeLog
98
ChangeLog
@ -1,3 +1,101 @@
|
||||
2006-04-07 Neil Williams <linux@codehelp.co.uk>
|
||||
|
||||
* libqof/qof/qof-be-utils.h : Removed. Content
|
||||
moved into qofutil.c alongside the function versions.
|
||||
|
||||
* libqof/qof/qofutil.c : Replaces gnc-engine-util.c
|
||||
* libqof/qof/gnc-engine-util.c : Removed.
|
||||
* libqof/qof/qofutil.h : Replaces gnc-engine-util.h
|
||||
* libqof/qof/gnc-engine-util.h : Removed.
|
||||
|
||||
Standardise on gint and gchar. libqof 0.6.4 release.
|
||||
* libqof/qof/qofbackend-p.h :
|
||||
* libqof/qof/qofbook.c :
|
||||
* libqof/qof/qofbackend.h : Replace Doxygen fix.
|
||||
* libqof/qof/qofbook.h :
|
||||
* libqof/qof/kvp_frame.c :
|
||||
* libqof/qof/qofquery.c :
|
||||
* libqof/qof/kvp_frame.h :
|
||||
* libqof/qof/qoflog.c : Add Utilities to the default
|
||||
log_module list.
|
||||
* libqof/qof/qofquerycore.h :
|
||||
* libqof/qof/qoflog.h :
|
||||
* libqof/qof/qofsession.h :
|
||||
* libqof/qof/qofid-p.h :
|
||||
* libqof/qof/qofreference.c :
|
||||
* libqof/qof/qofsql.c : Allow INSERT queries
|
||||
to be logged.
|
||||
* libqof/qof/qofsql.h :
|
||||
* libqof/qof/gnc-numeric.h :
|
||||
* libqof/qof/qofclass.h :
|
||||
* libqof/qof/qofla-dir.h.in : Licence typo.
|
||||
* libqof/qof/qof.h : New files.
|
||||
* libqof/qof/guid.h :
|
||||
* libqof/qof/deprecated.c : Replace gnc_strpcpy.
|
||||
* libqof/qof/qofbook-p.h :
|
||||
* libqof/qof/deprecated.h : Deprecate
|
||||
qof_book_set_schedxactions which has no
|
||||
declaration. Deprecate the expression of
|
||||
glib.h in the QOF API. libqof2 applications
|
||||
will have to include glib.h directly. Prevents
|
||||
a redundant dependency in qof packages.
|
||||
* libqof/qof/qofinstance.c :
|
||||
* libqof/qof/gnc-date.c :
|
||||
* libqof/qof/qofquerycore-p.h :
|
||||
* libqof/qof/gnc-date.h :
|
||||
* libqof/qof/qofevent.c :
|
||||
* libqof/qof/qofevent.h :
|
||||
* libqof/qof/qofid.h :
|
||||
* libqof/qof/qofbookmerge.c :
|
||||
* libqof/qof/qofbookmerge.h :
|
||||
* libqof/qof/qofgobj.c :
|
||||
* libqof/qof/Makefile.am : New files.
|
||||
* libqof/qof/qofbackend.c : Move the function
|
||||
versions of the begin_edit and commit_edit
|
||||
routines to the Utilities file alongside
|
||||
the macro versions from qof-be-utils.h
|
||||
|
||||
* libqof/backend/file/qsf-backend.c : using gint64 so don't use the
|
||||
32bit glib macros, GINT_TO_POINTER and GPOINTER_TO_INT.
|
||||
* libqof/backend/file/qsf-xml-map.c :
|
||||
* libqof/backend/file/qof-backend-qsf.h :
|
||||
* libqof/backend/file/qsf-xml.c :
|
||||
* libqof/backend/file/qsf-xml.h : add encoding backend
|
||||
option. Set the option using the default KvpValue,
|
||||
then manipulate the option and store the value back into the
|
||||
KvpValue and backend configuration KvpFrame.
|
||||
|
||||
Explicitly including glib.h instead of relying
|
||||
on libqof to reduce dependency problems.
|
||||
* register/ledger-core/gnc-ledger-display.c :
|
||||
* backend/file/test/test-load-backend.c :
|
||||
* backend/file/sixtp-utils.c :
|
||||
* business/business-core/gncBusGuile.c :
|
||||
* business/business-core/gw-business-core-spec.scm :
|
||||
* business/dialog-tax-table/gw-dialog-tax-table-spec.scm :
|
||||
* gnome-utils/QuickFill.c :
|
||||
* engine/gw-kvp-spec.scm :
|
||||
* engine/gnc-pricedb.c :
|
||||
* engine/Account.c :
|
||||
* engine/engine-helpers.c :
|
||||
* engine/gnc-lot.c :
|
||||
* engine/kvp-scm.c :
|
||||
* engine/Period.c :
|
||||
* engine/Transaction.c :
|
||||
* engine/test/test-load-engine.c :
|
||||
* engine/gnc-commodity.c :
|
||||
* engine/gnc-associate-account.c :
|
||||
* engine/gnc-engine.c :
|
||||
* engine/SchedXaction.c :
|
||||
* engine/gnc-session.c :
|
||||
* app-utils/gnc-component-manager.c :
|
||||
* app-utils/gnc-account-merge.c :
|
||||
|
||||
* app-utils/gnc-ui-util.c : Replacing deprecated code.
|
||||
|
||||
* src/doc/gnc-numeric-example.txt : Move example from
|
||||
gnc_numeric.h to a separate Doxygen file.
|
||||
|
||||
2006-04-07 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome-utils/gnc-main-window.c: Patch from chpe@gnome.org to
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (C) 2006 Joshua Sled <jsled@asynchronous.org> */
|
||||
|
||||
#include <glib.h>
|
||||
#include "gnc-account-merge.h"
|
||||
#include "Account.h"
|
||||
#include "Group.h"
|
||||
|
@ -128,7 +128,7 @@ clear_mask_hash (GHashTable *hash)
|
||||
static gboolean
|
||||
destroy_mask_hash_helper (gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
gnc_string_cache_remove (key);
|
||||
qof_util_string_cache_remove (key);
|
||||
g_free (value);
|
||||
|
||||
return TRUE;
|
||||
@ -245,7 +245,7 @@ add_event_type (ComponentEventInfo *cei, GNCIdTypeConst entity_type,
|
||||
mask = g_hash_table_lookup (cei->event_masks, entity_type);
|
||||
if (!mask)
|
||||
{
|
||||
char * key = gnc_string_cache_insert ((gpointer) entity_type);
|
||||
char * key = qof_util_string_cache_insert ((gpointer) entity_type);
|
||||
mask = g_new0 (QofEventId, 1);
|
||||
g_hash_table_insert (cei->event_masks, key, mask);
|
||||
}
|
||||
|
@ -61,6 +61,15 @@ static int auto_decimal_places = 2; /* default, can be changed */
|
||||
static gboolean reverse_balance_inited = FALSE;
|
||||
static gboolean reverse_type[NUM_ACCOUNT_TYPES];
|
||||
|
||||
/* FIXME: xaccParseAmountExtended causes test-print-parse-amount
|
||||
to fail if GNC_SCANF_LLD is simply replaced by G_GINT64_FORMAT. Why?
|
||||
*/
|
||||
#if HAVE_SCANF_LLD
|
||||
# define GNC_SCANF_LLD "%lld" /**< \deprecated use G_GINT64_FORMAT instead. */
|
||||
#else
|
||||
# define GNC_SCANF_LLD "%qd" /**< \deprecated use G_GINT64_FORMAT instead. */
|
||||
#endif
|
||||
|
||||
/* Cache currency ISO codes and only look them up in gconf when
|
||||
* absolutely necessary. Can't cache a pointer to the data structure
|
||||
* as that will change any time the book changes. */
|
||||
@ -1245,7 +1254,7 @@ PrintAmountInternal(char *buf, gnc_numeric val, const GNCPrintAmountInfo *info)
|
||||
}
|
||||
|
||||
/* print the integer part without separators */
|
||||
sprintf(temp_buf, "%" G_GINT64_FORMAT, whole.num);
|
||||
sprintf(temp_buf, GNC_SCANF_LLD, whole.num);
|
||||
num_whole_digits = strlen (temp_buf);
|
||||
|
||||
if (!info->use_separators)
|
||||
@ -1470,60 +1479,60 @@ xaccSPrintAmount (char * bufp, gnc_numeric val, GNCPrintAmountInfo info)
|
||||
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 1))
|
||||
bufp = gnc_stpcpy(bufp, sign);
|
||||
bufp = g_stpcpy(bufp, sign);
|
||||
|
||||
/* Now see if we print currency */
|
||||
if (cs_precedes)
|
||||
{
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 3))
|
||||
bufp = gnc_stpcpy(bufp, sign);
|
||||
bufp = g_stpcpy(bufp, sign);
|
||||
|
||||
if (info.use_symbol)
|
||||
{
|
||||
bufp = gnc_stpcpy(bufp, currency_symbol);
|
||||
bufp = g_stpcpy(bufp, currency_symbol);
|
||||
if (sep_by_space)
|
||||
bufp = gnc_stpcpy(bufp, " ");
|
||||
bufp = g_stpcpy(bufp, " ");
|
||||
}
|
||||
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 4))
|
||||
bufp = gnc_stpcpy(bufp, sign);
|
||||
bufp = g_stpcpy(bufp, sign);
|
||||
}
|
||||
|
||||
/* Now see if we print parentheses */
|
||||
if (print_sign && (sign_posn == 0))
|
||||
bufp = gnc_stpcpy(bufp, "(");
|
||||
bufp = g_stpcpy(bufp, "(");
|
||||
|
||||
/* Now print the value */
|
||||
bufp += PrintAmountInternal(bufp, val, &info);
|
||||
|
||||
/* Now see if we print parentheses */
|
||||
if (print_sign && (sign_posn == 0))
|
||||
bufp = gnc_stpcpy(bufp, ")");
|
||||
bufp = g_stpcpy(bufp, ")");
|
||||
|
||||
/* Now see if we print currency */
|
||||
if (!cs_precedes)
|
||||
{
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 3))
|
||||
bufp = gnc_stpcpy(bufp, sign);
|
||||
bufp = g_stpcpy(bufp, sign);
|
||||
|
||||
if (info.use_symbol)
|
||||
{
|
||||
if (sep_by_space)
|
||||
bufp = gnc_stpcpy(bufp, " ");
|
||||
bufp = gnc_stpcpy(bufp, currency_symbol);
|
||||
bufp = g_stpcpy(bufp, " ");
|
||||
bufp = g_stpcpy(bufp, currency_symbol);
|
||||
}
|
||||
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 4))
|
||||
bufp = gnc_stpcpy(bufp, sign);
|
||||
bufp = g_stpcpy(bufp, sign);
|
||||
}
|
||||
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 2))
|
||||
bufp = gnc_stpcpy(bufp, sign);
|
||||
bufp = g_stpcpy(bufp, sign);
|
||||
|
||||
/* return length of printed string */
|
||||
return (bufp - orig_bufp);
|
||||
|
Loading…
Reference in New Issue
Block a user