mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Re-indentation of source code.
This re-indentation was done using astyle-1.24 using the following options: astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19301 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
63eed826bd
commit
187da546b6
@ -60,7 +60,11 @@ sqlEscapeString (sqlEscape *b, const char *str)
|
||||
|
||||
ENTER("str = %s", str);
|
||||
|
||||
if (!b || !str) { LEAVE("(null) args"); return NULL; }
|
||||
if (!b || !str)
|
||||
{
|
||||
LEAVE("(null) args");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* if a string is escaped twice, just return the first */
|
||||
if (b->escape == str)
|
||||
@ -144,7 +148,11 @@ void
|
||||
sqlEscape_destroy (sqlEscape *b)
|
||||
{
|
||||
ENTER(" ");
|
||||
if (!b) { LEAVE("b is (null)"); return; }
|
||||
if (!b)
|
||||
{
|
||||
LEAVE("b is (null)");
|
||||
return;
|
||||
}
|
||||
g_free (b->escape);
|
||||
b->escape = NULL;
|
||||
g_free (b);
|
||||
|
@ -1249,7 +1249,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
|
||||
}
|
||||
|
||||
static GncSqlColumnTypeHandler string_handler
|
||||
= {
|
||||
=
|
||||
{
|
||||
load_string,
|
||||
add_string_col_info_to_list,
|
||||
gnc_sql_add_colname_to_list,
|
||||
@ -1261,8 +1262,8 @@ typedef void (*IntSetterFunc)( const gpointer, gint );
|
||||
|
||||
static void
|
||||
load_int( const GncSqlBackend* be, GncSqlRow* row,
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
{
|
||||
const GValue* val;
|
||||
gint int_value;
|
||||
@ -1297,7 +1298,7 @@ const GncSqlColumnTableEntry* table_row )
|
||||
|
||||
static void
|
||||
add_int_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
GList** pList )
|
||||
{
|
||||
GncSqlColumnInfo* info;
|
||||
|
||||
@ -1312,7 +1313,7 @@ GList** pList )
|
||||
|
||||
static void
|
||||
add_gvalue_int_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
{
|
||||
gint int_value = 0;
|
||||
IntAccessFunc i_getter;
|
||||
@ -1346,7 +1347,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
|
||||
}
|
||||
|
||||
static GncSqlColumnTypeHandler int_handler
|
||||
= {
|
||||
=
|
||||
{
|
||||
load_int,
|
||||
add_int_col_info_to_list,
|
||||
gnc_sql_add_colname_to_list,
|
||||
@ -1358,8 +1360,8 @@ typedef void (*BooleanSetterFunc)( const gpointer, gboolean );
|
||||
|
||||
static void
|
||||
load_boolean( const GncSqlBackend* be, GncSqlRow* row,
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
{
|
||||
const GValue* val;
|
||||
gint int_value;
|
||||
@ -1394,7 +1396,7 @@ const GncSqlColumnTableEntry* table_row )
|
||||
|
||||
static void
|
||||
add_boolean_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
GList** pList )
|
||||
{
|
||||
GncSqlColumnInfo* info;
|
||||
|
||||
@ -1409,7 +1411,7 @@ GList** pList )
|
||||
|
||||
static void
|
||||
add_gvalue_boolean_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
{
|
||||
gint int_value = 0;
|
||||
BooleanAccessFunc b_getter;
|
||||
@ -1443,7 +1445,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
|
||||
}
|
||||
|
||||
static GncSqlColumnTypeHandler boolean_handler
|
||||
= {
|
||||
=
|
||||
{
|
||||
load_boolean,
|
||||
add_boolean_col_info_to_list,
|
||||
gnc_sql_add_colname_to_list,
|
||||
@ -1455,8 +1458,8 @@ typedef void (*Int64SetterFunc)( const gpointer, gint64 );
|
||||
|
||||
static void
|
||||
load_int64( const GncSqlBackend* be, GncSqlRow* row,
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
{
|
||||
const GValue* val;
|
||||
gint64 i64_value = 0;
|
||||
@ -1485,7 +1488,7 @@ const GncSqlColumnTableEntry* table_row )
|
||||
|
||||
static void
|
||||
add_int64_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
GList** pList )
|
||||
{
|
||||
GncSqlColumnInfo* info;
|
||||
|
||||
@ -1500,7 +1503,7 @@ GList** pList )
|
||||
|
||||
static void
|
||||
add_gvalue_int64_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
{
|
||||
gint64 i64_value = 0;
|
||||
Int64AccessFunc getter;
|
||||
@ -1533,7 +1536,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
|
||||
}
|
||||
|
||||
static GncSqlColumnTypeHandler int64_handler
|
||||
= {
|
||||
=
|
||||
{
|
||||
load_int64,
|
||||
add_int64_col_info_to_list,
|
||||
gnc_sql_add_colname_to_list,
|
||||
@ -1543,8 +1547,8 @@ static GncSqlColumnTypeHandler int64_handler
|
||||
|
||||
static void
|
||||
load_double( const GncSqlBackend* be, GncSqlRow* row,
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
{
|
||||
const GValue* val;
|
||||
gdouble d_value;
|
||||
@ -1592,7 +1596,7 @@ const GncSqlColumnTableEntry* table_row )
|
||||
|
||||
static void
|
||||
add_double_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
GList** pList )
|
||||
{
|
||||
GncSqlColumnInfo* info;
|
||||
|
||||
@ -1607,7 +1611,7 @@ GList** pList )
|
||||
|
||||
static void
|
||||
add_gvalue_double_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
{
|
||||
QofAccessFunc getter;
|
||||
gdouble* pDouble = NULL;
|
||||
@ -1642,7 +1646,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
|
||||
}
|
||||
|
||||
static GncSqlColumnTypeHandler double_handler
|
||||
= {
|
||||
=
|
||||
{
|
||||
load_double,
|
||||
add_double_col_info_to_list,
|
||||
gnc_sql_add_colname_to_list,
|
||||
@ -1652,8 +1657,8 @@ static GncSqlColumnTypeHandler double_handler
|
||||
|
||||
static void
|
||||
load_guid( const GncSqlBackend* be, GncSqlRow* row,
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
{
|
||||
const GValue* val;
|
||||
GncGUID guid;
|
||||
@ -1691,7 +1696,7 @@ const GncSqlColumnTableEntry* table_row )
|
||||
|
||||
static void
|
||||
add_guid_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
GList** pList )
|
||||
{
|
||||
GncSqlColumnInfo* info;
|
||||
|
||||
@ -1706,7 +1711,7 @@ GList** pList )
|
||||
|
||||
static void
|
||||
add_gvalue_guid_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
{
|
||||
QofAccessFunc getter;
|
||||
const GncGUID* guid = NULL;
|
||||
@ -1743,7 +1748,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
|
||||
}
|
||||
|
||||
static GncSqlColumnTypeHandler guid_handler
|
||||
= {
|
||||
=
|
||||
{
|
||||
load_guid,
|
||||
add_guid_col_info_to_list,
|
||||
gnc_sql_add_colname_to_list,
|
||||
@ -1753,7 +1759,7 @@ static GncSqlColumnTypeHandler guid_handler
|
||||
|
||||
void
|
||||
gnc_sql_add_gvalue_objectref_guid_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
{
|
||||
QofAccessFunc getter;
|
||||
const GncGUID* guid = NULL;
|
||||
@ -1796,8 +1802,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
|
||||
|
||||
void
|
||||
gnc_sql_add_objectref_guid_col_info_to_list( const GncSqlBackend* be,
|
||||
const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
{
|
||||
add_guid_col_info_to_list( be, table_row, pList );
|
||||
}
|
||||
@ -1824,14 +1830,14 @@ gnc_sql_convert_timespec_to_string( const GncSqlBackend* be, Timespec ts )
|
||||
else year = tm->tm_year + 1900;
|
||||
|
||||
datebuf = g_strdup_printf( be->timespec_format,
|
||||
year, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec );
|
||||
year, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec );
|
||||
return datebuf;
|
||||
}
|
||||
|
||||
static void
|
||||
load_timespec( const GncSqlBackend* be, GncSqlRow* row,
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
{
|
||||
const GValue* val;
|
||||
Timespec ts = {0, 0};
|
||||
@ -1859,12 +1865,12 @@ const GncSqlColumnTableEntry* table_row )
|
||||
{
|
||||
gchar* buf;
|
||||
buf = g_strdup_printf( "%c%c%c%c-%c%c-%c%c %c%c:%c%c:%c%c",
|
||||
s[0], s[1], s[2], s[3],
|
||||
s[4], s[5],
|
||||
s[6], s[7],
|
||||
s[8], s[9],
|
||||
s[10], s[11],
|
||||
s[12], s[13] );
|
||||
s[0], s[1], s[2], s[3],
|
||||
s[4], s[5],
|
||||
s[6], s[7],
|
||||
s[8], s[9],
|
||||
s[10], s[11],
|
||||
s[12], s[13] );
|
||||
ts = gnc_iso8601_to_timespec_gmt( buf );
|
||||
g_free( buf );
|
||||
isOK = TRUE;
|
||||
@ -1891,7 +1897,7 @@ const GncSqlColumnTableEntry* table_row )
|
||||
|
||||
static void
|
||||
add_timespec_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
GList** pList )
|
||||
{
|
||||
GncSqlColumnInfo* info;
|
||||
|
||||
@ -1906,7 +1912,7 @@ GList** pList )
|
||||
|
||||
static void
|
||||
add_gvalue_timespec_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
{
|
||||
TimespecAccessFunc ts_getter;
|
||||
Timespec ts;
|
||||
@ -1945,7 +1951,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
|
||||
}
|
||||
|
||||
static GncSqlColumnTypeHandler timespec_handler
|
||||
= {
|
||||
=
|
||||
{
|
||||
load_timespec,
|
||||
add_timespec_col_info_to_list,
|
||||
gnc_sql_add_colname_to_list,
|
||||
@ -1956,8 +1963,8 @@ static GncSqlColumnTypeHandler timespec_handler
|
||||
|
||||
static void
|
||||
load_date( const GncSqlBackend* be, GncSqlRow* row,
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
/*@ null @*/ QofSetterFunc setter, gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row )
|
||||
{
|
||||
const GValue* val;
|
||||
GDate* date;
|
||||
@ -2016,7 +2023,7 @@ const GncSqlColumnTableEntry* table_row )
|
||||
|
||||
static void
|
||||
add_date_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
|
||||
GList** pList )
|
||||
GList** pList )
|
||||
{
|
||||
GncSqlColumnInfo* info;
|
||||
|
||||
@ -2031,8 +2038,8 @@ GList** pList )
|
||||
|
||||
static void
|
||||
add_gvalue_date_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
|
||||
const gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
const gpointer pObject,
|
||||
const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
{
|
||||
GDate* date = NULL;
|
||||
QofAccessFunc getter;
|
||||
@ -2062,7 +2069,7 @@ const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
if ( g_date_valid( date ) )
|
||||
{
|
||||
buf = g_strdup_printf( "%04d%02d%02d",
|
||||
g_date_get_year( date ), g_date_get_month( date ), g_date_get_day( date ) );
|
||||
g_date_get_year( date ), g_date_get_month( date ), g_date_get_day( date ) );
|
||||
g_value_take_string( value, buf );
|
||||
}
|
||||
|
||||
@ -2070,7 +2077,8 @@ const GncSqlColumnTableEntry* table_row, GSList** pList )
|
||||
}
|
||||
|
||||
static GncSqlColumnTypeHandler date_handler
|
||||
= {
|
||||
=
|
||||
{
|
||||
load_date,
|
||||
add_date_col_info_to_list,
|
||||
gnc_sql_add_colname_to_list,
|
||||
|
@ -831,9 +831,9 @@ gnc_xml_be_remove_old_files(FileBackend *be)
|
||||
{
|
||||
/* Is a lock file. Skip the active lock file */
|
||||
if ((safe_strcmp(name, be->linkfile) != 0) &&
|
||||
/* Only delete lock files older than the active one */
|
||||
(g_stat(name, &statbuf) == 0) &&
|
||||
(statbuf.st_mtime < lockstatbuf.st_mtime))
|
||||
/* Only delete lock files older than the active one */
|
||||
(g_stat(name, &statbuf) == 0) &&
|
||||
(statbuf.st_mtime < lockstatbuf.st_mtime))
|
||||
{
|
||||
PINFO ("remove stale lock file: %s", name);
|
||||
g_unlink(name);
|
||||
@ -1195,7 +1195,7 @@ gnc_backend_new(void)
|
||||
retain_type_changed_cb(NULL, (gpointer)be); /* Get retain_type from gconf */
|
||||
|
||||
if ( (gnc_be->file_retention_type == XML_RETAIN_DAYS) &&
|
||||
(gnc_be->file_retention_days == 0 ) )
|
||||
(gnc_be->file_retention_days == 0 ) )
|
||||
{
|
||||
/* Backwards compatibility code. Pre 2.3.15, 0 retain_days meant
|
||||
* "keep forever". From 2.3.15 on this is controlled via a multiple
|
||||
|
@ -105,13 +105,13 @@ static gchar *environment_expand(gchar *param)
|
||||
gchar *closing_brace;
|
||||
gchar *result;
|
||||
gchar *tmp;
|
||||
gchar *expanded=NULL;
|
||||
gchar *expanded = NULL;
|
||||
|
||||
if (!param)
|
||||
return NULL;
|
||||
|
||||
/* Set an initial return value, so we can always use g_strconcat below) */
|
||||
result=g_strdup ("x");
|
||||
result = g_strdup ("x");
|
||||
|
||||
/* Look for matching pairs of { and }. Anything in between should be expanded */
|
||||
search_start = param;
|
||||
@ -142,7 +142,7 @@ static gchar *environment_expand(gchar *param)
|
||||
}
|
||||
|
||||
/* Expand the variable we found and append it to the result */
|
||||
to_expand = g_strndup (opening_brace + 1, closing_brace - opening_brace -1);
|
||||
to_expand = g_strndup (opening_brace + 1, closing_brace - opening_brace - 1);
|
||||
env_val = g_getenv (to_expand);
|
||||
tmp = g_strconcat (result, env_val, NULL);
|
||||
g_free (result);
|
||||
@ -173,7 +173,7 @@ environment_override()
|
||||
{
|
||||
const gchar *path;
|
||||
gchar *env_file;
|
||||
GKeyFile *keyfile=g_key_file_new();
|
||||
GKeyFile *keyfile = g_key_file_new();
|
||||
GError *error;
|
||||
gchar **env_vars;
|
||||
gsize param_count;
|
||||
@ -181,8 +181,8 @@ environment_override()
|
||||
gboolean got_keyfile;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
config_path = gnc_path_get_pkgsysconfdir();
|
||||
share_path = gnc_path_get_pkgdatadir();
|
||||
config_path = gnc_path_get_pkgsysconfdir();
|
||||
share_path = gnc_path_get_pkgdatadir();
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
if ((path = g_getenv("GNC_CONFIG_PATH")))
|
||||
@ -715,11 +715,11 @@ inner_main (void *closure, int argc, char **argv)
|
||||
|
||||
#ifdef MAC_INTEGRATION
|
||||
{
|
||||
gchar *data_dir = gnc_path_get_pkgdatadir();
|
||||
gchar *accelmap = g_build_filename(data_dir, "ui", "osx_accel_map", NULL);
|
||||
gtk_accel_map_load (accelmap);
|
||||
g_free(data_dir);
|
||||
g_free(accelmap);
|
||||
gchar *data_dir = gnc_path_get_pkgdatadir();
|
||||
gchar *accelmap = g_build_filename(data_dir, "ui", "osx_accel_map", NULL);
|
||||
gtk_accel_map_load (accelmap);
|
||||
g_free(data_dir);
|
||||
g_free(accelmap);
|
||||
}
|
||||
#endif /* MAC_INTEGRATION */
|
||||
|
||||
|
@ -1484,15 +1484,15 @@ gboolean gncEntryEqual(const GncEntry *a, const GncEntry *b)
|
||||
CHECK_NUMERIC(a, b, i_disc_value_rounded);
|
||||
|
||||
#if 0
|
||||
Timespec date;
|
||||
Timespec date_entered;
|
||||
Timespec date;
|
||||
Timespec date_entered;
|
||||
|
||||
/* employee bill data */
|
||||
GncEntryPaymentType b_payment;
|
||||
/* employee bill data */
|
||||
GncEntryPaymentType b_payment;
|
||||
|
||||
/* customer invoice */
|
||||
GList * i_tax_values;
|
||||
Timespec i_taxtable_modtime;
|
||||
/* customer invoice */
|
||||
GList * i_tax_values;
|
||||
Timespec i_taxtable_modtime;
|
||||
|
||||
#endif
|
||||
}
|
||||
@ -1507,22 +1507,22 @@ gboolean gncEntryEqual(const GncEntry *a, const GncEntry *b)
|
||||
CHECK_NUMERIC(a, b, b_tax_value);
|
||||
CHECK_NUMERIC(a, b, b_tax_value_rounded);
|
||||
#if 0
|
||||
Timespec date;
|
||||
Timespec date_entered;
|
||||
Timespec date;
|
||||
Timespec date_entered;
|
||||
|
||||
/* vendor bill data */
|
||||
gboolean b_taxable;
|
||||
gboolean b_taxincluded;
|
||||
GncTaxTable * b_tax_table;
|
||||
gboolean billable;
|
||||
GncOwner billto;
|
||||
/* vendor bill data */
|
||||
gboolean b_taxable;
|
||||
gboolean b_taxincluded;
|
||||
GncTaxTable * b_tax_table;
|
||||
gboolean billable;
|
||||
GncOwner billto;
|
||||
|
||||
/* employee bill data */
|
||||
GncEntryPaymentType b_payment;
|
||||
/* employee bill data */
|
||||
GncEntryPaymentType b_payment;
|
||||
|
||||
/* vendor bill */
|
||||
GList * b_tax_values;
|
||||
Timespec b_taxtable_modtime;
|
||||
/* vendor bill */
|
||||
GList * b_tax_values;
|
||||
Timespec b_taxtable_modtime;
|
||||
#endif
|
||||
}
|
||||
/* FIXME: Need real tests */
|
||||
|
@ -917,8 +917,8 @@ gboolean gncTaxTableEqual(const GncTaxTable *a, const GncTaxTable *b)
|
||||
GncTaxTableEntryList* b_node;
|
||||
|
||||
for (a_node = a->entries, b_node = b->entries;
|
||||
a_node != NULL && b_node != NULL;
|
||||
a_node = a_node->next, b_node = b_node->next)
|
||||
a_node != NULL && b_node != NULL;
|
||||
a_node = a_node->next, b_node = b_node->next)
|
||||
{
|
||||
if (!gncTaxTableEntryEqual((GncTaxTableEntry*)a_node->data,
|
||||
(GncTaxTableEntry*)b_node->data))
|
||||
|
@ -71,13 +71,15 @@ static GncSqlColumnTableEntry tt_col_table[] =
|
||||
{ "guid", CT_GUID, 0, COL_NNUL | COL_PKEY, "guid" },
|
||||
{ "name", CT_STRING, MAX_NAME_LEN, COL_NNUL, "name" },
|
||||
{ "refcount", CT_INT64, 0, COL_NNUL, NULL, GNC_TT_REFCOUNT },
|
||||
{ "invisible", CT_BOOLEAN, 0, COL_NNUL, NULL, NULL,
|
||||
{
|
||||
"invisible", CT_BOOLEAN, 0, COL_NNUL, NULL, NULL,
|
||||
(QofAccessFunc)gncTaxTableGetInvisible, (QofSetterFunc)set_invisible
|
||||
},
|
||||
/* { "child", CT_TAXTABLEREF, 0, 0, NULL, NULL,
|
||||
get_child, (QofSetterFunc)gncTaxTableSetChild }, */
|
||||
{ "parent", CT_GUID, 0, 0, NULL, NULL,
|
||||
(QofAccessFunc)bt_get_parent, tt_set_parent
|
||||
{
|
||||
"parent", CT_GUID, 0, 0, NULL, NULL,
|
||||
(QofAccessFunc)bt_get_parent, tt_set_parent
|
||||
},
|
||||
{ NULL }
|
||||
};
|
||||
|
@ -73,7 +73,7 @@ create_session(void)
|
||||
GncJob* job;
|
||||
GncTaxTable* tt;
|
||||
GncTaxTableEntry* tte;
|
||||
|
||||
|
||||
table = gnc_commodity_table_get_table( book );
|
||||
currency = gnc_commodity_table_lookup( table, GNC_COMMODITY_NS_CURRENCY, "CAD" );
|
||||
|
||||
|
@ -367,11 +367,12 @@ gnc_gbr_find_prefix (const gchar *default_prefix)
|
||||
GtkOSXApplication* theApp = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL);
|
||||
gchar *id = gtk_osxapplication_get_bundle_id (theApp);
|
||||
gchar *path = gtk_osxapplication_get_resource_path (theApp);
|
||||
if (id == NULL) {
|
||||
gchar *dirname = g_path_get_dirname (path);
|
||||
g_free (path);
|
||||
g_free (id);
|
||||
return dirname;
|
||||
if (id == NULL)
|
||||
{
|
||||
gchar *dirname = g_path_get_dirname (path);
|
||||
g_free (path);
|
||||
g_free (id);
|
||||
return dirname;
|
||||
}
|
||||
g_free (id);
|
||||
return path;
|
||||
|
@ -76,8 +76,8 @@ gchar *gnc_path_get_pkglibdir()
|
||||
{
|
||||
gchar *libdir = gnc_path_get_libdir ();
|
||||
#ifdef G_OS_WIN32
|
||||
/* Workaround for Bug 618646, {pkglibdir} will be bin/ on Windows */
|
||||
gchar *result = gnc_gbr_find_bin_dir(libdir);
|
||||
/* Workaround for Bug 618646, {pkglibdir} will be bin/ on Windows */
|
||||
gchar *result = gnc_gbr_find_bin_dir(libdir);
|
||||
#else
|
||||
gchar *result = g_build_filename (libdir, "gnucash", (char*)NULL);
|
||||
#endif
|
||||
|
@ -235,11 +235,11 @@ gchar *gnc_account_name_violations_errmsg (const gchar *separator, GList* invali
|
||||
The resulting string will be displayed to the user if there are
|
||||
account names containing the separator character. */
|
||||
message = g_strdup_printf(
|
||||
_("The separator character \"%s\" is used in one or more account names.\n\n"
|
||||
"This will result in unexpected behaviour. "
|
||||
"Either change the account names or choose another separator character.\n\n"
|
||||
"Below you will find the list of invalid account names:\n"
|
||||
"%s"), separator, account_list );
|
||||
_("The separator character \"%s\" is used in one or more account names.\n\n"
|
||||
"This will result in unexpected behaviour. "
|
||||
"Either change the account names or choose another separator character.\n\n"
|
||||
"Below you will find the list of invalid account names:\n"
|
||||
"%s"), separator, account_list );
|
||||
g_free ( account_list );
|
||||
return message;
|
||||
}
|
||||
|
@ -605,28 +605,31 @@ gnc_budget_get_default (QofBook *book)
|
||||
/* See if there is a budget selected in the KVP perferences */
|
||||
|
||||
kvp_default_budget = kvp_frame_get_slot_path(qof_book_get_slots (book),
|
||||
KVP_OPTION_PATH,
|
||||
OPTION_SECTION_BUDGETING,
|
||||
OPTION_NAME_DEFAULT_BUDGET,
|
||||
NULL);
|
||||
|
||||
if (kvp_default_budget != NULL ) {
|
||||
default_budget_guid = kvp_value_get_guid(kvp_default_budget);
|
||||
if (default_budget_guid != NULL) {
|
||||
col = qof_book_get_collection(book, GNC_ID_BUDGET);
|
||||
bgt = (GncBudget *) qof_collection_lookup_entity(col,
|
||||
default_budget_guid);
|
||||
}
|
||||
KVP_OPTION_PATH,
|
||||
OPTION_SECTION_BUDGETING,
|
||||
OPTION_NAME_DEFAULT_BUDGET,
|
||||
NULL);
|
||||
|
||||
if (kvp_default_budget != NULL )
|
||||
{
|
||||
default_budget_guid = kvp_value_get_guid(kvp_default_budget);
|
||||
if (default_budget_guid != NULL)
|
||||
{
|
||||
col = qof_book_get_collection(book, GNC_ID_BUDGET);
|
||||
bgt = (GncBudget *) qof_collection_lookup_entity(col,
|
||||
default_budget_guid);
|
||||
}
|
||||
}
|
||||
|
||||
/* Revert to 2.2.x behavior if there is no defined budget in KVP */
|
||||
|
||||
if ( bgt == NULL ) {
|
||||
col = qof_book_get_collection(book, GNC_ID_BUDGET);
|
||||
if (qof_collection_count(col) > 0)
|
||||
{
|
||||
qof_collection_foreach(col, just_get_one, &bgt);
|
||||
}
|
||||
if ( bgt == NULL )
|
||||
{
|
||||
col = qof_book_get_collection(book, GNC_ID_BUDGET);
|
||||
if (qof_collection_count(col) > 0)
|
||||
{
|
||||
qof_collection_foreach(col, just_get_one, &bgt);
|
||||
}
|
||||
}
|
||||
|
||||
return bgt;
|
||||
|
@ -220,7 +220,7 @@ static gnc_quote_source multiple_quote_sources[] =
|
||||
{ FALSE, 0, 0, "Nasdaq (Yahoo, ...)", "NASDAQ", "nasdaq" },
|
||||
{ FALSE, 0, 0, "New Zealand (Yahoo, ...)", "NZ", "nz" },
|
||||
{ FALSE, 0, 0, "NYSE (Yahoo, ...)", "NYSE", "nyse" },
|
||||
/* { FALSE, 0, 0, "South Africa (Sharenet, ...)", "ZA", "za" }, */
|
||||
/* { FALSE, 0, 0, "South Africa (Sharenet, ...)", "ZA", "za" }, */
|
||||
{ FALSE, 0, 0, "T. Rowe Price", "TRPRICE", "troweprice" },
|
||||
{ FALSE, 0, 0, "U.K. Unit Trusts", "UKUNITTRUSTS", "uk_unit_trusts" },
|
||||
{ FALSE, 0, 0, "USA (Yahoo, Fool ...)", "USA", "usa" },
|
||||
|
@ -1168,8 +1168,8 @@ test_recursion (QofSession *original, guint counter)
|
||||
copy = qof_session_new();
|
||||
if (debug)
|
||||
{
|
||||
/* FIXME XML backend can't handle STDOUT
|
||||
* qof_session_begin(copy, QOF_STDOUT, TRUE, FALSE); */
|
||||
/* FIXME XML backend can't handle STDOUT
|
||||
* qof_session_begin(copy, QOF_STDOUT, TRUE, FALSE); */
|
||||
}
|
||||
/* TODO: implement QOF_TYPE_CHOICE testing. */
|
||||
qof_instance_copy_coll_r(copy, grand_coll);
|
||||
@ -1190,9 +1190,9 @@ test_recursion (QofSession *original, guint counter)
|
||||
do_test((f == c.collect), "Number of children in descendents does not match");
|
||||
if (counter == 4 && debug == TRUE)
|
||||
{
|
||||
/* FIXME XML backend can't handle STDOUT
|
||||
* qof_session_save(copy, NULL);
|
||||
qof_session_save(original, NULL); */
|
||||
/* FIXME XML backend can't handle STDOUT
|
||||
* qof_session_save(copy, NULL);
|
||||
qof_session_save(original, NULL); */
|
||||
}
|
||||
qof_session_end(copy);
|
||||
copy = NULL;
|
||||
@ -1213,8 +1213,8 @@ main (int argc, const char *argv[])
|
||||
original = qof_session_new();
|
||||
if (debug)
|
||||
{
|
||||
/* FIXME XML backend can't handle STDOUT
|
||||
* qof_session_begin(original, QOF_STDOUT, TRUE, FALSE); */
|
||||
/* FIXME XML backend can't handle STDOUT
|
||||
* qof_session_begin(original, QOF_STDOUT, TRUE, FALSE); */
|
||||
}
|
||||
create_data(original, (counter % 5));
|
||||
test_recursion(original, (counter % 5));
|
||||
|
@ -211,12 +211,12 @@ gnc_module_system_refresh(void)
|
||||
* not build clean libtool modules with "-module", we get dynamic
|
||||
* libraries ending on .dylib
|
||||
* On Windows, all modules will move to bin/, so they will be mixed with
|
||||
* other libraries, such as gtk+. Adding a prefix "libgncmod" filter will prevent
|
||||
* other libraries, such as gtk+. Adding a prefix "libgncmod" filter will prevent
|
||||
* module loader load other libraries. And the filter should works on other platform.
|
||||
*/
|
||||
if ((g_str_has_suffix(dent, "." G_MODULE_SUFFIX)
|
||||
|| g_str_has_suffix(dent, ".dylib"))
|
||||
&& g_str_has_prefix(dent, GNC_MODULE_PREFIX))
|
||||
|| g_str_has_suffix(dent, ".dylib"))
|
||||
&& g_str_has_prefix(dent, GNC_MODULE_PREFIX))
|
||||
{
|
||||
/* get the full path name, then dlopen the library and see
|
||||
* if it has the appropriate symbols to be a gnc_module */
|
||||
|
@ -152,12 +152,12 @@ gnc_account_separator_prefs_cb (GConfEntry *unused, GtkWidget *dialog)
|
||||
image = gnc_glade_lookup_widget(dialog, "separator_error");
|
||||
book = gnc_get_current_book();
|
||||
invalid_account_names = gnc_account_list_name_violations ( book,
|
||||
gnc_get_account_separator_string() );
|
||||
gnc_get_account_separator_string() );
|
||||
if ( invalid_account_names )
|
||||
{
|
||||
GtkTooltipsData *tipsdata = gtk_tooltips_data_get (image);
|
||||
gchar *message = gnc_account_name_violations_errmsg ( gnc_get_account_separator_string(),
|
||||
invalid_account_names );
|
||||
invalid_account_names );
|
||||
gnc_warning_dialog(dialog, "%s", message);
|
||||
|
||||
gtk_tooltips_set_tip ( tipsdata->tooltips, image, message, NULL);
|
||||
|
@ -573,12 +573,12 @@ gnc_post_file_open (const char * filename)
|
||||
char * newfile;
|
||||
QofBackendError io_err = ERR_BACKEND_NO_ERR;
|
||||
|
||||
gchar *protocol=NULL;
|
||||
gchar *hostname=NULL;
|
||||
gchar *username=NULL;
|
||||
gchar *password=NULL;
|
||||
gchar *path=NULL;
|
||||
gint32 port=0;
|
||||
gchar *protocol = NULL;
|
||||
gchar *hostname = NULL;
|
||||
gchar *username = NULL;
|
||||
gchar *password = NULL;
|
||||
gchar *path = NULL;
|
||||
gint32 port = 0;
|
||||
|
||||
|
||||
ENTER(" ");
|
||||
@ -608,7 +608,7 @@ gnc_post_file_open (const char * filename)
|
||||
{
|
||||
gboolean have_valid_pw = FALSE;
|
||||
have_valid_pw = gnc_keyring_get_password ( NULL, protocol, hostname, port,
|
||||
path, &username, &password );
|
||||
path, &username, &password );
|
||||
if (!have_valid_pw)
|
||||
return FALSE;
|
||||
|
||||
@ -828,11 +828,11 @@ gnc_post_file_open (const char * filename)
|
||||
* and inform the user if there are any */
|
||||
new_book = gnc_get_current_book();
|
||||
invalid_account_names = gnc_account_list_name_violations ( new_book,
|
||||
gnc_get_account_separator_string() );
|
||||
gnc_get_account_separator_string() );
|
||||
if ( invalid_account_names )
|
||||
{
|
||||
gchar *message = gnc_account_name_violations_errmsg ( gnc_get_account_separator_string(),
|
||||
invalid_account_names );
|
||||
invalid_account_names );
|
||||
gnc_warning_dialog(NULL, "%s", message);
|
||||
g_free ( message );
|
||||
}
|
||||
@ -1072,12 +1072,12 @@ gnc_file_do_save_as (const char* filename)
|
||||
char *newfile;
|
||||
const char *oldfile;
|
||||
|
||||
gchar *protocol=NULL;
|
||||
gchar *hostname=NULL;
|
||||
gchar *username=NULL;
|
||||
gchar *password=NULL;
|
||||
gchar *path=NULL;
|
||||
gint32 port=0;
|
||||
gchar *protocol = NULL;
|
||||
gchar *hostname = NULL;
|
||||
gchar *username = NULL;
|
||||
gchar *password = NULL;
|
||||
gchar *path = NULL;
|
||||
gint32 port = 0;
|
||||
|
||||
|
||||
QofBackendError io_err = ERR_BACKEND_NO_ERR;
|
||||
|
@ -87,7 +87,7 @@ void gnc_keyring_set_password (const gchar *access_method,
|
||||
{
|
||||
CFStringRef osx_resultstring = SecCopyErrorMessageString( status, NULL );
|
||||
const gchar *resultstring = CFStringGetCStringPtr(osx_resultstring,
|
||||
GetApplicationTextEncoding());
|
||||
GetApplicationTextEncoding());
|
||||
PWARN ( "OS X keychain error: %s", resultstring );
|
||||
PWARN ( "The user will be prompted for a password again next time." );
|
||||
CFRelease ( osx_resultstring );
|
||||
@ -168,7 +168,7 @@ gboolean gnc_keyring_get_password ( GtkWidget *parent,
|
||||
{
|
||||
CFStringRef osx_resultstring = SecCopyErrorMessageString( status, NULL );
|
||||
const gchar *resultstring = CFStringGetCStringPtr(osx_resultstring,
|
||||
GetApplicationTextEncoding());
|
||||
GetApplicationTextEncoding());
|
||||
PWARN ( "OS X keychain error: %s", resultstring );
|
||||
CFRelease ( osx_resultstring );
|
||||
}
|
||||
|
@ -1525,9 +1525,9 @@ gnc_main_window_update_one_menu_action (GncMainWindow *window,
|
||||
(char *)NULL);
|
||||
#ifdef MAC_INTEGRATION
|
||||
{
|
||||
GtkOSXApplication *theApp =
|
||||
g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
|
||||
gtk_osxapplication_sync_menubar(theApp);
|
||||
GtkOSXApplication *theApp =
|
||||
g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
|
||||
gtk_osxapplication_sync_menubar(theApp);
|
||||
}
|
||||
#endif
|
||||
LEAVE(" ");
|
||||
@ -1572,17 +1572,18 @@ gnc_main_window_update_radio_button (GncMainWindow *window)
|
||||
/* Block the signal so as not to affect window ordering (top to
|
||||
* bottom) on the screen */
|
||||
action_list = gtk_radio_action_get_group(GTK_RADIO_ACTION(action));
|
||||
if (action_list) {
|
||||
first_action = g_slist_last(action_list)->data;
|
||||
g_signal_handlers_block_by_func(G_OBJECT(first_action),
|
||||
G_CALLBACK(gnc_main_window_cmd_window_raise),
|
||||
window);
|
||||
DEBUG("blocked signal on %p, set %p active, window %p", first_action,
|
||||
action, window);
|
||||
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), TRUE);
|
||||
g_signal_handlers_unblock_by_func(G_OBJECT(first_action),
|
||||
G_CALLBACK(gnc_main_window_cmd_window_raise),
|
||||
window);
|
||||
if (action_list)
|
||||
{
|
||||
first_action = g_slist_last(action_list)->data;
|
||||
g_signal_handlers_block_by_func(G_OBJECT(first_action),
|
||||
G_CALLBACK(gnc_main_window_cmd_window_raise),
|
||||
window);
|
||||
DEBUG("blocked signal on %p, set %p active, window %p", first_action,
|
||||
action, window);
|
||||
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), TRUE);
|
||||
g_signal_handlers_unblock_by_func(G_OBJECT(first_action),
|
||||
G_CALLBACK(gnc_main_window_cmd_window_raise),
|
||||
window);
|
||||
}
|
||||
g_free(action_name);
|
||||
LEAVE(" ");
|
||||
@ -3351,12 +3352,12 @@ gtk_quartz_should_quit (GtkOSXApplication *theApp, GncMainWindow *window)
|
||||
|
||||
gboolean finished = gnc_main_window_all_finish_pending();
|
||||
if (!finished)
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
session = gnc_get_current_session();
|
||||
needs_save = qof_book_not_saved(qof_session_get_book(session)) &&
|
||||
!gnc_file_save_in_progress();
|
||||
if (needs_save && gnc_main_window_prompt_for_save(GTK_WIDGET(window)))
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
gnc_shutdown(0);
|
||||
return FALSE;
|
||||
}
|
||||
@ -3386,8 +3387,8 @@ gtk_quartz_set_menu(GncMainWindow* window)
|
||||
item = gtk_ui_manager_get_widget (window->ui_merge,
|
||||
"/menubar/Help/HelpAbout");
|
||||
if (GTK_IS_MENU_ITEM (item))
|
||||
gtk_osxapplication_add_app_menu_item (theApp, group,
|
||||
GTK_MENU_ITEM (item));
|
||||
gtk_osxapplication_add_app_menu_item (theApp, group,
|
||||
GTK_MENU_ITEM (item));
|
||||
|
||||
/* the preferences group */
|
||||
group = gtk_osxapplication_add_app_menu_group (theApp);
|
||||
@ -3395,8 +3396,8 @@ gtk_quartz_set_menu(GncMainWindow* window)
|
||||
item = gtk_ui_manager_get_widget (window->ui_merge,
|
||||
"/menubar/Edit/EditPreferences");
|
||||
if (GTK_IS_MENU_ITEM (item))
|
||||
gtk_osxapplication_add_app_menu_item (theApp, group,
|
||||
GTK_MENU_ITEM (item));
|
||||
gtk_osxapplication_add_app_menu_item (theApp, group,
|
||||
GTK_MENU_ITEM (item));
|
||||
|
||||
item = gtk_ui_manager_get_widget (window->ui_merge,
|
||||
"/menubar/Help");
|
||||
@ -3405,7 +3406,7 @@ gtk_quartz_set_menu(GncMainWindow* window)
|
||||
"/menubar/Windows");
|
||||
gtk_osxapplication_set_window_menu(theApp, GTK_MENU_ITEM(item));
|
||||
g_signal_connect(theApp, "NSApplicationBlockTermination",
|
||||
G_CALLBACK(gtk_quartz_should_quit), window);
|
||||
G_CALLBACK(gtk_quartz_should_quit), window);
|
||||
|
||||
}
|
||||
#endif //MAC_INTEGRATION
|
||||
@ -4009,12 +4010,12 @@ gnc_main_window_show_all_windows(void)
|
||||
{
|
||||
gtk_widget_show(GTK_WIDGET(window_iter->data));
|
||||
#ifdef MAC_INTEGRATION
|
||||
gtk_quartz_set_menu(window_iter->data);
|
||||
gtk_quartz_set_menu(window_iter->data);
|
||||
#endif
|
||||
}
|
||||
#ifdef MAC_INTEGRATION
|
||||
g_signal_connect(theApp, "NSApplicationWillTerminate",
|
||||
G_CALLBACK(gtk_quartz_shutdown), NULL);
|
||||
G_CALLBACK(gtk_quartz_shutdown), NULL);
|
||||
gtk_osxapplication_ready(theApp);
|
||||
#endif
|
||||
}
|
||||
|
@ -134,11 +134,13 @@ gnc_html_webkit_init( GncHtmlWebkit* self )
|
||||
g_object_set (G_OBJECT(webkit_settings), "default-encoding", "utf-8", NULL);
|
||||
if (default_font_family == NULL)
|
||||
{
|
||||
PWARN("webkit_settings: Cannot get default font family.");
|
||||
}else{
|
||||
PWARN("webkit_settings: Cannot get default font family.");
|
||||
}
|
||||
else
|
||||
{
|
||||
g_object_set (G_OBJECT(webkit_settings),
|
||||
"default-font-family", default_font_family,
|
||||
NULL);
|
||||
"default-font-family", default_font_family,
|
||||
NULL);
|
||||
PINFO("webkit_settings: Set default font to [%s]", default_font_family);
|
||||
}
|
||||
|
||||
@ -562,7 +564,7 @@ webkit_navigation_requested_cb( WebKitWebView* web_view, WebKitWebFrame* frame,
|
||||
}
|
||||
|
||||
type = gnc_html_parse_url( GNC_HTML(self), url, &location, &label );
|
||||
if( strcmp( type, "file" ) == 0 )
|
||||
if ( strcmp( type, "file" ) == 0 )
|
||||
{
|
||||
LEAVE("URI type is 'file'");
|
||||
return WEBKIT_NAVIGATION_RESPONSE_ACCEPT;
|
||||
|
@ -650,7 +650,7 @@ get_available_empty_job(AB_ACCOUNT *ab_acc, GncABTransType trans_type)
|
||||
#ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
#endif
|
||||
))
|
||||
))
|
||||
{
|
||||
if (job) AB_Job_free(job);
|
||||
return NULL;
|
||||
|
@ -88,7 +88,7 @@ gnc_ab_getbalance(GtkWidget *parent, Account *gnc_acc)
|
||||
#ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
#endif
|
||||
))
|
||||
))
|
||||
{
|
||||
g_warning("gnc_ab_getbalance: JobGetBalance not available for this "
|
||||
"account");
|
||||
@ -113,7 +113,7 @@ gnc_ab_getbalance(GtkWidget *parent, Account *gnc_acc)
|
||||
#ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
#endif
|
||||
))
|
||||
))
|
||||
{
|
||||
g_warning("gnc_ab_getbalance: Error on executing job");
|
||||
goto cleanup;
|
||||
|
@ -150,7 +150,7 @@ gnc_ab_gettrans(GtkWidget *parent, Account *gnc_acc)
|
||||
#ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
#endif
|
||||
))
|
||||
))
|
||||
{
|
||||
g_warning("gnc_ab_gettrans: JobGetTransactions not available for this "
|
||||
"account");
|
||||
@ -177,7 +177,7 @@ gnc_ab_gettrans(GtkWidget *parent, Account *gnc_acc)
|
||||
#ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
#endif
|
||||
))
|
||||
))
|
||||
{
|
||||
g_warning("gnc_ab_gettrans: Error on executing job");
|
||||
goto cleanup;
|
||||
|
@ -179,7 +179,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
|
||||
#ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
#endif
|
||||
))
|
||||
))
|
||||
{
|
||||
if (!gnc_verify_dialog(
|
||||
parent, FALSE, "%s",
|
||||
@ -264,7 +264,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
|
||||
#ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
#endif
|
||||
);
|
||||
);
|
||||
|
||||
/* Ignore the return value of AB_Banking_ExecuteJobs(), as the job's
|
||||
* status always describes better whether the job was actually
|
||||
|
@ -906,7 +906,7 @@ gnc_ab_get_permanent_certs(void)
|
||||
# ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
# endif
|
||||
);
|
||||
);
|
||||
#else
|
||||
/* FIXME: Add code for older AqBanking versions */
|
||||
/* See QBankmanager 0.9.50 in src/kbanking/libs/kbanking.cpp lines 323ff
|
||||
|
@ -192,7 +192,7 @@ gnc_file_aqbanking_import(const gchar *aqbanking_importername,
|
||||
#ifndef AQBANKING_VERSION_5_PLUS
|
||||
, 0
|
||||
#endif
|
||||
))
|
||||
))
|
||||
{
|
||||
g_warning("gnc_file_aqbanking_import: Error on import");
|
||||
goto cleanup;
|
||||
|
@ -1118,7 +1118,7 @@ qof_query_merge(QofQuery *q1, QofQuery *q2, QofQueryOp op)
|
||||
* so that the first term added to an empty query doesn't screw up.
|
||||
*/
|
||||
if ((QOF_QUERY_AND == op) &&
|
||||
( (0 == qof_query_has_terms (q1)) || (0 == qof_query_has_terms (q2)) ))
|
||||
( (0 == qof_query_has_terms (q1)) || (0 == qof_query_has_terms (q2)) ))
|
||||
{
|
||||
op = QOF_QUERY_OR;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ gnc_basic_cell_has_type_name (BasicCell *cell, const gchar *type_name)
|
||||
{
|
||||
if (!cell) return FALSE;
|
||||
if (!type_name) return FALSE;
|
||||
if(!cell->cell_type_name) return FALSE;
|
||||
if (!cell->cell_type_name) return FALSE;
|
||||
|
||||
return (g_strcmp0 (type_name, cell->cell_type_name));
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ BasicCell * gnc_table_get_cell (Table *table, VirtualLocation virt_loc);
|
||||
const char * gnc_table_get_cell_name (Table *table,
|
||||
VirtualLocation virt_loc);
|
||||
const gchar * gnc_table_get_cell_type_name (Table *table,
|
||||
VirtualLocation virt_loc);
|
||||
VirtualLocation virt_loc);
|
||||
gboolean gnc_table_get_cell_location (Table *table,
|
||||
const char * cell_name,
|
||||
VirtualCellLocation vcell_loc,
|
||||
|
@ -1218,11 +1218,11 @@ gnucash_sheet_check_direct_update_cell(GnucashSheet *sheet,
|
||||
|
||||
type_name = gnc_table_get_cell_type_name (sheet->table, virt_loc);
|
||||
|
||||
if( (g_strcmp0 (type_name, DATE_CELL_TYPE_NAME) == 0)
|
||||
|| (g_strcmp0 (type_name, COMBO_CELL_TYPE_NAME) == 0)
|
||||
|| (g_strcmp0 (type_name, NUM_CELL_TYPE_NAME) == 0)
|
||||
|| (g_strcmp0 (type_name, PRICE_CELL_TYPE_NAME) == 0)
|
||||
|| (g_strcmp0 (type_name, FORMULA_CELL_TYPE_NAME) == 0)) return TRUE;
|
||||
if ( (g_strcmp0 (type_name, DATE_CELL_TYPE_NAME) == 0)
|
||||
|| (g_strcmp0 (type_name, COMBO_CELL_TYPE_NAME) == 0)
|
||||
|| (g_strcmp0 (type_name, NUM_CELL_TYPE_NAME) == 0)
|
||||
|| (g_strcmp0 (type_name, PRICE_CELL_TYPE_NAME) == 0)
|
||||
|| (g_strcmp0 (type_name, FORMULA_CELL_TYPE_NAME) == 0)) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -1911,15 +1911,15 @@ gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
|
||||
save keyval to handle GDK_KP_Decimal event
|
||||
*/
|
||||
if (sheet->preedit_length)
|
||||
{
|
||||
sheet->shift_state = 0;
|
||||
sheet->keyval_state = 0;
|
||||
}
|
||||
{
|
||||
sheet->shift_state = 0;
|
||||
sheet->keyval_state = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sheet->shift_state = event->state & GDK_SHIFT_MASK;
|
||||
sheet->keyval_state = (event->keyval == GDK_KP_Decimal)? GDK_KP_Decimal:0;
|
||||
}
|
||||
{
|
||||
sheet->shift_state = event->state & GDK_SHIFT_MASK;
|
||||
sheet->keyval_state = (event->keyval == GDK_KP_Decimal) ? GDK_KP_Decimal : 0;
|
||||
}
|
||||
if (gtk_im_context_filter_keypress (sheet->im_context, event))
|
||||
{
|
||||
sheet->need_im_reset = TRUE;
|
||||
@ -1996,9 +1996,9 @@ gnucash_sheet_commit_cb (GtkIMContext *context, const gchar *str,
|
||||
|
||||
event = gdk_event_new (GDK_KEY_PRESS);
|
||||
keyevent = (GdkEventKey *) event;
|
||||
keyevent->keyval =
|
||||
sheet->keyval_state ? sheet->keyval_state
|
||||
: gdk_unicode_to_keyval(str[0]);
|
||||
keyevent->keyval =
|
||||
sheet->keyval_state ? sheet->keyval_state
|
||||
: gdk_unicode_to_keyval(str[0]);
|
||||
keyevent->state |= sheet->shift_state;
|
||||
result = gnucash_sheet_direct_event(sheet, event);
|
||||
gdk_event_free(event);
|
||||
|
Loading…
Reference in New Issue
Block a user