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