mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Restore enter/leave indentation. Cleanup some deprecated and (nearly-)unused qoflog code. Audit fraction enter/leave pairs. :/
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15539 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -38,10 +38,7 @@ const char * gnc_log_prettify (const char *name)
|
||||
void gnc_start_clock (int a, QofLogModule b, gncLogLevel c, const char *d, const char *e, ...) { }
|
||||
void gnc_report_clock (int a, QofLogModule b, gncLogLevel c, const char *d, const char *e, ...) { }
|
||||
void gnc_report_clock_total (int a, QofLogModule b, gncLogLevel c, const char *d, const char *e, ...) { }
|
||||
gboolean gnc_should_log(QofLogModule log_module, gncLogLevel log_level)
|
||||
{
|
||||
return qof_log_check(log_module, log_level);
|
||||
}
|
||||
|
||||
gint
|
||||
gnc_engine_register_event_handler (GNCEngineEventHandler handler,
|
||||
gpointer user_data)
|
||||
|
||||
@@ -66,21 +66,6 @@ const char * gnc_log_prettify (const char *name);
|
||||
/** \deprecated use qof_log_check instead. */
|
||||
gboolean gnc_should_log(QofLogModule log_module, gncLogLevel log_level);
|
||||
|
||||
/** \deprecated */
|
||||
#define GNC_LOG_FATAL QOF_LOG_FATAL
|
||||
/** \deprecated */
|
||||
#define GNC_LOG_ERROR QOF_LOG_ERROR
|
||||
/** \deprecated */
|
||||
#define GNC_LOG_WARNING QOF_LOG_WARNING
|
||||
/** \deprecated */
|
||||
#define GNC_LOG_INFO QOF_LOG_INFO
|
||||
/** \deprecated */
|
||||
#define GNC_LOG_DEBUG QOF_LOG_DEBUG
|
||||
/** \deprecated */
|
||||
#define GNC_LOG_DETAIL QOF_LOG_DETAIL
|
||||
/** \deprecated */
|
||||
#define GNC_LOG_TRACE QOF_LOG_TRACE
|
||||
|
||||
/** \deprecated use qof_start_clock */
|
||||
void gnc_start_clock (int, QofLogModule, gncLogLevel, const char*, const char*, ...);
|
||||
/** \deprecated use qof_report_clock */
|
||||
|
||||
+49
-56
@@ -57,19 +57,13 @@ static GHashTable *log_table = NULL;
|
||||
static GLogFunc previous_handler = NULL;
|
||||
|
||||
void
|
||||
qof_log_add_indent(void)
|
||||
qof_log_indent(void)
|
||||
{
|
||||
qof_log_num_spaces += QOF_LOG_INDENT_WIDTH;
|
||||
}
|
||||
|
||||
gint
|
||||
qof_log_get_indent(void)
|
||||
{
|
||||
return qof_log_num_spaces;
|
||||
}
|
||||
|
||||
void
|
||||
qof_log_drop_indent(void)
|
||||
qof_log_dedent(void)
|
||||
{
|
||||
qof_log_num_spaces
|
||||
= (qof_log_num_spaces < QOF_LOG_INDENT_WIDTH)
|
||||
@@ -96,48 +90,9 @@ log4glib_handler(const gchar *log_domain,
|
||||
const gchar *message,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean debug = FALSE;
|
||||
GHashTable *log_levels = (GHashTable*)user_data;
|
||||
gchar *domain_copy = g_strdup(log_domain == NULL ? "" : log_domain);
|
||||
gchar *dot_pointer = domain_copy;
|
||||
static const QofLogLevel default_log_thresh = QOF_LOG_WARNING;
|
||||
QofLogLevel longest_match_level = default_log_thresh;
|
||||
if (G_LIKELY(!qof_log_check(log_domain, log_level)))
|
||||
return;
|
||||
|
||||
{
|
||||
gpointer match_level;
|
||||
if ((match_level = g_hash_table_lookup(log_levels, "")) != NULL)
|
||||
longest_match_level = (QofLogLevel)GPOINTER_TO_INT(match_level);
|
||||
}
|
||||
|
||||
if (debug) { printf("trying [%s] (%d):", log_domain, g_hash_table_size(log_levels)); }
|
||||
if (log_levels)
|
||||
{
|
||||
// e.g., "a.b.c" -> "a\0b.c" -> "a.b\0c", "a.b.c"
|
||||
gpointer match_level;
|
||||
while ((dot_pointer = g_strstr_len(dot_pointer, strlen(dot_pointer), ".")) != NULL)
|
||||
{
|
||||
*dot_pointer = '\0';
|
||||
if (debug) { printf(" [%s]", domain_copy); }
|
||||
if (g_hash_table_lookup_extended(log_levels, domain_copy, NULL, &match_level))
|
||||
{
|
||||
longest_match_level = (QofLogLevel)GPOINTER_TO_INT(match_level);
|
||||
if (debug) printf("*");
|
||||
}
|
||||
*dot_pointer = '.';
|
||||
dot_pointer++;
|
||||
}
|
||||
|
||||
if (debug) { printf(" [%s]", domain_copy); }
|
||||
if (g_hash_table_lookup_extended(log_levels, domain_copy, NULL, &match_level))
|
||||
{
|
||||
longest_match_level = (QofLogLevel)GPOINTER_TO_INT(match_level);
|
||||
if (debug) { printf("*"); }
|
||||
}
|
||||
}
|
||||
if (debug) { printf(" found [%d]\n", longest_match_level); }
|
||||
g_free(domain_copy);
|
||||
|
||||
if (log_level <= longest_match_level)
|
||||
{
|
||||
gboolean last_char_is_newline;
|
||||
char timestamp_buf[10];
|
||||
@@ -152,7 +107,7 @@ log4glib_handler(const gchar *log_domain,
|
||||
timestamp_buf,
|
||||
5, level_str,
|
||||
(log_domain == NULL ? "" : log_domain),
|
||||
0 /*qof_log_num_spaces*/, "",
|
||||
qof_log_num_spaces, "",
|
||||
message,
|
||||
(g_str_has_suffix(message, "\n") ? "" : "\n"));
|
||||
fflush(fout);
|
||||
@@ -269,13 +224,51 @@ qof_log_prettify (const char *name)
|
||||
}
|
||||
|
||||
gboolean
|
||||
qof_log_check(QofLogModule log_module, QofLogLevel log_level)
|
||||
qof_log_check(QofLogModule log_domain, QofLogLevel log_level)
|
||||
{
|
||||
QofLogLevel level, maximum;
|
||||
if (!log_table || log_module == NULL || log_level < 0) { return FALSE; }
|
||||
maximum = GPOINTER_TO_INT(g_hash_table_lookup(log_table, log_module));
|
||||
if (log_level <= maximum) { return TRUE; }
|
||||
return FALSE;
|
||||
//#define _QLC_DBG(x) x
|
||||
#define _QLC_DBG(x)
|
||||
GHashTable *log_levels = log_table;
|
||||
gchar *domain_copy = g_strdup(log_domain == NULL ? "" : log_domain);
|
||||
gchar *dot_pointer = domain_copy;
|
||||
static const QofLogLevel default_log_thresh = QOF_LOG_WARNING;
|
||||
QofLogLevel longest_match_level = default_log_thresh;
|
||||
|
||||
{
|
||||
gpointer match_level;
|
||||
if ((match_level = g_hash_table_lookup(log_levels, "")) != NULL)
|
||||
longest_match_level = (QofLogLevel)GPOINTER_TO_INT(match_level);
|
||||
}
|
||||
|
||||
_QLC_DBG({ printf("trying [%s] (%d):", log_domain, g_hash_table_size(log_levels)); });
|
||||
if (G_LIKELY(log_levels))
|
||||
{
|
||||
// e.g., "a.b.c" -> "a\0b.c" -> "a.b\0c", "a.b.c"
|
||||
gpointer match_level;
|
||||
while ((dot_pointer = g_strstr_len(dot_pointer, strlen(dot_pointer), ".")) != NULL)
|
||||
{
|
||||
*dot_pointer = '\0';
|
||||
_QLC_DBG({ printf(" [%s]", domain_copy); });
|
||||
if (g_hash_table_lookup_extended(log_levels, domain_copy, NULL, &match_level))
|
||||
{
|
||||
longest_match_level = (QofLogLevel)GPOINTER_TO_INT(match_level);
|
||||
_QLC_DBG(printf("*"););
|
||||
}
|
||||
*dot_pointer = '.';
|
||||
dot_pointer++;
|
||||
}
|
||||
|
||||
_QLC_DBG({ printf(" [%s]", domain_copy); });
|
||||
if (g_hash_table_lookup_extended(log_levels, domain_copy, NULL, &match_level))
|
||||
{
|
||||
longest_match_level = (QofLogLevel)GPOINTER_TO_INT(match_level);
|
||||
_QLC_DBG({ printf("*"); });
|
||||
}
|
||||
}
|
||||
_QLC_DBG({ printf(" found [%d]\n", longest_match_level); });
|
||||
g_free(domain_copy);
|
||||
|
||||
return log_level <= longest_match_level;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+27
-34
@@ -45,26 +45,20 @@
|
||||
_(QOF_LOG_ERROR, = G_LOG_LEVEL_CRITICAL) \
|
||||
_(QOF_LOG_WARNING, = G_LOG_LEVEL_WARNING) \
|
||||
_(QOF_LOG_INFO, = G_LOG_LEVEL_INFO) \
|
||||
_(QOF_LOG_DEBUG, = G_LOG_LEVEL_DEBUG) \
|
||||
_(QOF_LOG_DETAIL, = G_LOG_LEVEL_DEBUG) \
|
||||
_(QOF_LOG_TRACE, = G_LOG_LEVEL_DEBUG)
|
||||
_(QOF_LOG_DEBUG, = G_LOG_LEVEL_DEBUG)
|
||||
|
||||
DEFINE_ENUM (QofLogLevel, LOG_LEVEL_LIST)
|
||||
|
||||
gchar* qof_log_level_to_string(QofLogLevel lvl);
|
||||
QofLogLevel qof_log_level_from_string(gchar *str);
|
||||
|
||||
/** indents once for each ENTER macro */
|
||||
void qof_log_add_indent(void);
|
||||
|
||||
/** gets the running total of the indent */
|
||||
gint qof_log_get_indent(void);
|
||||
/** indents once for each ENTER macro **/
|
||||
void qof_log_indent(void);
|
||||
|
||||
/**
|
||||
* drops back one indent for each LEAVE macro
|
||||
* indent is reset to zero if less than a single indent would exist.
|
||||
* drops back one indent for each LEAVE macro, capped at 0.
|
||||
**/
|
||||
void qof_log_drop_indent(void);
|
||||
void qof_log_dedent(void);
|
||||
|
||||
/**
|
||||
* Initialize the error logging subsystem. Defaults to a level-threshold of
|
||||
@@ -79,14 +73,11 @@ void qof_log_set_level(QofLogModule module, QofLogLevel level);
|
||||
|
||||
/**
|
||||
* Specify an alternate log output, to pipe or file.
|
||||
* Needs to be called \b before qof_log_init()
|
||||
* \deprecated
|
||||
**/
|
||||
void qof_log_set_file (FILE *outfile);
|
||||
|
||||
/**
|
||||
* Specify a filename for log output.
|
||||
* Calls qof_log_init() for you.
|
||||
**/
|
||||
void qof_log_init_filename (const gchar* logfilename);
|
||||
|
||||
@@ -143,30 +134,32 @@ typedef void (*QofLogCB) (QofLogModule log_module, QofLogLevel* log_level,
|
||||
|
||||
/** Print a function entry debugging message */
|
||||
#define ENTER(format, args...) do { \
|
||||
g_log (log_module, G_LOG_LEVEL_DEBUG, \
|
||||
"[enter %s:%s()] " format, __FILE__, \
|
||||
PRETTY_FUNC_NAME , ## args); \
|
||||
qof_log_add_indent(); \
|
||||
if (qof_log_check(log_module, G_LOG_LEVEL_DEBUG)) { \
|
||||
g_log (log_module, G_LOG_LEVEL_DEBUG, \
|
||||
"[enter %s:%s()] " format, __FILE__, \
|
||||
PRETTY_FUNC_NAME , ## args); \
|
||||
qof_log_indent(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define gnc_leave_return_val_if_fail(test, val) do { \
|
||||
if (! (test)) { LEAVE(""); } \
|
||||
g_return_val_if_fail(test, val); \
|
||||
} while (0);
|
||||
|
||||
#define gnc_leave_return_if_fail(test) do { \
|
||||
if (! (test)) { LEAVE(""); } \
|
||||
g_return_if_fail(test); \
|
||||
} while (0);
|
||||
|
||||
/** Print a function exit debugging message */
|
||||
#define LEAVE(format, args...) do { \
|
||||
qof_log_drop_indent(); \
|
||||
g_log (log_module, G_LOG_LEVEL_DEBUG, \
|
||||
"[leave %s()] " format, \
|
||||
PRETTY_FUNC_NAME , ## args); \
|
||||
} while (0)
|
||||
|
||||
/** Print a function trace debugging message */
|
||||
#define TRACE(format, args...) do { \
|
||||
g_log (log_module, G_LOG_LEVEL_DEBUG, \
|
||||
"[trace %s()] " format, PRETTY_FUNC_NAME , ## args); \
|
||||
} while (0)
|
||||
|
||||
#define DEBUGCMD(x) do { \
|
||||
if (qof_log_check (log_module, QOF_LOG_DEBUG)) { \
|
||||
(x); \
|
||||
} \
|
||||
if (qof_log_check(log_module, G_LOG_LEVEL_DEBUG)) { \
|
||||
qof_log_dedent(); \
|
||||
g_log (log_module, G_LOG_LEVEL_DEBUG, \
|
||||
"[leave %s()] " format, \
|
||||
PRETTY_FUNC_NAME , ## args); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* -------------------------------------------------------- */
|
||||
|
||||
@@ -709,7 +709,8 @@ static GList * qof_query_run_internal (QofQuery *q,
|
||||
}
|
||||
|
||||
/* Maybe log this sucker */
|
||||
if (qof_log_check (log_module, QOF_LOG_DETAIL)) qof_query_print (q);
|
||||
if (qof_log_check (log_module, QOF_LOG_DEBUG))
|
||||
qof_query_print (q);
|
||||
|
||||
/* Now run the query over all the objects and save the results */
|
||||
{
|
||||
|
||||
@@ -884,7 +884,7 @@ qof_sql_query_run (QofSqlQuery *query, const char *str)
|
||||
|
||||
qof_query_set_book (query->qof_query, query->book);
|
||||
/* Maybe log this sucker */
|
||||
if (gnc_should_log (log_module, GNC_LOG_DETAIL))
|
||||
if (qof_should_log (log_module, QOF_LOG_DEBUG))
|
||||
{
|
||||
qof_query_print (query->qof_query);
|
||||
}
|
||||
@@ -911,7 +911,7 @@ qof_sql_query_rerun (QofSqlQuery *query)
|
||||
qof_query_set_book (query->qof_query, query->book);
|
||||
|
||||
/* Maybe log this sucker */
|
||||
if (gnc_should_log (log_module, GNC_LOG_DETAIL))
|
||||
if (qof_should_log (log_module, QOF_LOG_DEBUG))
|
||||
{
|
||||
qof_query_print (query->qof_query);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,8 @@ gnc_account_dom_tree_create(Account *act, gboolean exporting)
|
||||
xmlAddChild(toaddto, gnc_lot_dom_tree_create(lot));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LEAVE("");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,6 +211,7 @@ file_session_begin(QofBackend *be_start, QofSession *session,
|
||||
if (NULL == be->fullpath)
|
||||
{
|
||||
qof_backend_set_error (be_start, ERR_FILEIO_FILE_NOT_FOUND);
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
be->be.fullpath = be->fullpath;
|
||||
@@ -229,6 +230,7 @@ file_session_begin(QofBackend *be_start, QofSession *session,
|
||||
qof_backend_set_error (be_start, ERR_FILEIO_FILE_NOT_FOUND);
|
||||
g_free (be->fullpath); be->fullpath = NULL;
|
||||
g_free (be->dirname); be->dirname = NULL;
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -240,6 +242,7 @@ file_session_begin(QofBackend *be_start, QofSession *session,
|
||||
qof_backend_set_error (be_start, ERR_FILEIO_FILE_NOT_FOUND);
|
||||
g_free (be->fullpath); be->fullpath = NULL;
|
||||
g_free (be->dirname); be->dirname = NULL;
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
if (rc == 0 && S_ISDIR(statbuf.st_mode))
|
||||
@@ -251,6 +254,7 @@ file_session_begin(QofBackend *be_start, QofSession *session,
|
||||
qof_backend_set_error (be_start, ERR_FILEIO_UNKNOWN_FILE_TYPE);
|
||||
g_free (be->fullpath); be->fullpath = NULL;
|
||||
g_free (be->dirname); be->dirname = NULL;
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -264,6 +268,7 @@ file_session_begin(QofBackend *be_start, QofSession *session,
|
||||
if (!ignore_lock && !gnc_file_be_get_file_lock (be))
|
||||
{
|
||||
g_free (be->lockfile); be->lockfile = NULL;
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -290,13 +295,13 @@ file_session_end(QofBackend *be_start)
|
||||
#ifdef G_OS_WIN32
|
||||
/* On windows, we need to allow write-access before
|
||||
g_unlink() can succeed */
|
||||
rv = g_chmod (be->lockfile, S_IWRITE | S_IREAD);
|
||||
rv = g_chmod (be->lockfile, S_IWRITE | S_IREAD);
|
||||
#endif
|
||||
rv = g_unlink (be->lockfile);
|
||||
if (rv) {
|
||||
PWARN("Error on g_unlink(%s): %d: %s", be->lockfile,
|
||||
errno, strerror(errno) ? strerror(errno) : "");
|
||||
}
|
||||
rv = g_unlink (be->lockfile);
|
||||
if (rv) {
|
||||
PWARN("Error on g_unlink(%s): %d: %s", be->lockfile,
|
||||
errno, strerror(errno) ? strerror(errno) : "");
|
||||
}
|
||||
}
|
||||
|
||||
g_free (be->dirname);
|
||||
@@ -528,6 +533,7 @@ gnc_file_be_write_to_file(FileBackend *fbe,
|
||||
if(!mktemp(tmp_name))
|
||||
{
|
||||
qof_backend_set_error(be, ERR_BACKEND_MISC);
|
||||
LEAVE("");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -535,6 +541,7 @@ gnc_file_be_write_to_file(FileBackend *fbe,
|
||||
{
|
||||
if(!gnc_file_be_backup_file(fbe))
|
||||
{
|
||||
LEAVE("");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -587,12 +594,14 @@ gnc_file_be_write_to_file(FileBackend *fbe,
|
||||
datafile ? datafile : "(null)",
|
||||
strerror(errno) ? strerror(errno) : "");
|
||||
g_free(tmp_name);
|
||||
LEAVE("");
|
||||
return FALSE;
|
||||
}
|
||||
if(!gnc_int_link_or_make_backup(fbe, tmp_name, datafile))
|
||||
{
|
||||
qof_backend_set_error(be, ERR_FILEIO_BACKUP_ERROR);
|
||||
g_free(tmp_name);
|
||||
LEAVE("");
|
||||
return FALSE;
|
||||
}
|
||||
if(g_unlink(tmp_name) != 0)
|
||||
@@ -602,6 +611,7 @@ gnc_file_be_write_to_file(FileBackend *fbe,
|
||||
tmp_name ? tmp_name : "(null)",
|
||||
strerror(errno) ? strerror(errno) : "");
|
||||
g_free(tmp_name);
|
||||
LEAVE("");
|
||||
return FALSE;
|
||||
}
|
||||
g_free(tmp_name);
|
||||
@@ -633,8 +643,10 @@ gnc_file_be_write_to_file(FileBackend *fbe,
|
||||
/* already in an error just flow on through */
|
||||
}
|
||||
g_free(tmp_name);
|
||||
LEAVE("");
|
||||
return FALSE;
|
||||
}
|
||||
LEAVE("");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ gnc_lot_dom_tree_create(GNCLot *lot)
|
||||
xmlNodePtr ret;
|
||||
kvp_frame *kf;
|
||||
|
||||
ENTER("(lot=%p)", lot);
|
||||
ENTER("(lot=%p)", lot);
|
||||
ret = xmlNewNode(NULL, BAD_CAST gnc_lot_string);
|
||||
xmlSetProp(ret, BAD_CAST "version", BAD_CAST lot_version_string);
|
||||
|
||||
@@ -76,6 +76,7 @@ gnc_lot_dom_tree_create(GNCLot *lot)
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE("");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -93,12 +94,13 @@ lot_id_handler (xmlNodePtr node, gpointer p)
|
||||
struct lot_pdata *pdata = p;
|
||||
GUID *guid;
|
||||
|
||||
ENTER("(lot=%p)", pdata->lot);
|
||||
ENTER("(lot=%p)", pdata->lot);
|
||||
guid = dom_tree_to_guid(node);
|
||||
gnc_lot_set_guid(pdata->lot, *guid);
|
||||
|
||||
g_free(guid);
|
||||
|
||||
LEAVE("");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -108,12 +110,12 @@ lot_slots_handler (xmlNodePtr node, gpointer p)
|
||||
struct lot_pdata *pdata = p;
|
||||
gboolean success;
|
||||
|
||||
ENTER("(lot=%p)", pdata->lot);
|
||||
ENTER("(lot=%p)", pdata->lot);
|
||||
success = dom_tree_to_kvp_frame_given
|
||||
(node, gnc_lot_get_slots (pdata->lot));
|
||||
(node, gnc_lot_get_slots (pdata->lot));
|
||||
|
||||
LEAVE("");
|
||||
g_return_val_if_fail(success, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -161,6 +163,7 @@ gnc_lot_end_handler(gpointer data_for_children,
|
||||
|
||||
xmlFreeNode(tree);
|
||||
|
||||
LEAVE("");
|
||||
return lot != NULL;
|
||||
}
|
||||
|
||||
@@ -186,6 +189,7 @@ dom_tree_to_lot (xmlNodePtr node, QofBook *book)
|
||||
lot = NULL;
|
||||
}
|
||||
|
||||
LEAVE("");
|
||||
return lot;
|
||||
}
|
||||
|
||||
|
||||
@@ -596,11 +596,12 @@ readGroup (QofBook *book, int fd, Account *aparent, int token)
|
||||
|
||||
/* read numAccs */
|
||||
err = read( fd, &numAcc, sizeof(int) );
|
||||
if( sizeof(int) != err )
|
||||
{
|
||||
xaccFreeAccountGroup (grp);
|
||||
return NULL;
|
||||
}
|
||||
if ( sizeof(int) != err )
|
||||
{
|
||||
xaccFreeAccountGroup (grp);
|
||||
LEAVE("");
|
||||
return NULL;
|
||||
}
|
||||
XACC_FLIP_INT (numAcc);
|
||||
|
||||
DEBUG ("expecting %d accounts", numAcc);
|
||||
@@ -610,8 +611,7 @@ readGroup (QofBook *book, int fd, Account *aparent, int token)
|
||||
{
|
||||
Account * acc = readAccount( book, fd, grp, token );
|
||||
if( NULL == acc ) {
|
||||
PERR("Short group read: \n"
|
||||
"\texpected %d, got %d accounts\n",numAcc,i);
|
||||
PERR("Short group read: expected %d, got %d accounts\n",numAcc,i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -622,6 +622,7 @@ readGroup (QofBook *book, int fd, Account *aparent, int token)
|
||||
if (aparent) {
|
||||
aparent->children = grp;
|
||||
}
|
||||
LEAVE("");
|
||||
return grp;
|
||||
}
|
||||
|
||||
@@ -651,7 +652,7 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
/* version 1 does not store the account number */
|
||||
if (1 < token) {
|
||||
err = read( fd, &accID, sizeof(int) );
|
||||
if( err != sizeof(int) ) { return NULL; }
|
||||
if( err != sizeof(int) ) { LEAVE(""); return NULL; }
|
||||
XACC_FLIP_INT (accID);
|
||||
acc = locateAccount (accID, book);
|
||||
/* locateAccountAlways should always accounts that are open for
|
||||
@@ -666,14 +667,14 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
/* flags are now gone - if you need these, use kv pairs */
|
||||
char tmpflags;
|
||||
err = read( fd, &tmpflags, sizeof(char) );
|
||||
if( err != sizeof(char) ) { return NULL; }
|
||||
if( err != sizeof(char) ) { LEAVE(""); return NULL; }
|
||||
}
|
||||
|
||||
/* if (9999>= token) */ {
|
||||
char ff_acctype;
|
||||
int acctype;
|
||||
err = read( fd, &(ff_acctype), sizeof(char) );
|
||||
if( err != sizeof(char) ) { return NULL; }
|
||||
if( err != sizeof(char) ) { LEAVE(""); return NULL; }
|
||||
switch (ff_acctype) {
|
||||
case FF_BANK: { acctype = ACCT_TYPE_BANK; break; }
|
||||
case FF_CASH: { acctype = ACCT_TYPE_CASH; break; }
|
||||
@@ -690,31 +691,31 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
case FF_MONEYMRKT: { acctype = ACCT_TYPE_MONEYMRKT; break; }
|
||||
case FF_CREDITLINE: { acctype = ACCT_TYPE_CREDITLINE; break; }
|
||||
case FF_CURRENCY: { acctype = ACCT_TYPE_CURRENCY; break; }
|
||||
default: return NULL;
|
||||
default: LEAVE(""); return NULL;
|
||||
}
|
||||
xaccAccountSetType (acc, acctype);
|
||||
}
|
||||
|
||||
tmp = readString( fd, token );
|
||||
if( NULL == tmp) return NULL;
|
||||
if (NULL == tmp) { LEAVE(""); return NULL; }
|
||||
DEBUG ("reading acct %s", tmp);
|
||||
xaccAccountSetName (acc, tmp);
|
||||
g_free (tmp);
|
||||
|
||||
if (8 <= token) {
|
||||
tmp = readString( fd, token );
|
||||
if( NULL == tmp) return NULL;
|
||||
if (NULL == tmp) { LEAVE(""); return NULL; }
|
||||
xaccAccountSetCode (acc, tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
||||
tmp = readString( fd, token );
|
||||
if( NULL == tmp ) return NULL;
|
||||
if (NULL == tmp ) { LEAVE(""); return NULL; }
|
||||
xaccAccountSetDescription (acc, tmp);
|
||||
g_free (tmp);
|
||||
|
||||
tmp = readString( fd, token );
|
||||
if( NULL == tmp ) return NULL;
|
||||
if (NULL == tmp ) { LEAVE(""); return NULL; }
|
||||
if(strlen(tmp) > 0) {
|
||||
xaccAccountSetNotes (acc, tmp);
|
||||
}
|
||||
@@ -724,7 +725,7 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
* in version 7 of the file format */
|
||||
if (7 <= token) {
|
||||
tmp = readString( fd, token );
|
||||
if( NULL == tmp ) return NULL;
|
||||
if( NULL == tmp ) { LEAVE(""); return NULL; }
|
||||
|
||||
PINFO ("currency is %s", tmp);
|
||||
currency = gnc_commodity_import_legacy(book, tmp);
|
||||
@@ -740,7 +741,7 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
if (tmp) g_free (tmp);
|
||||
|
||||
tmp = strdup (xaccAccountGetName (acc));
|
||||
if (tmp == NULL) return NULL;
|
||||
if (tmp == NULL) { LEAVE(""); return NULL; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -750,7 +751,8 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
|
||||
if(tmp) g_free (tmp);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
/* set the default currency when importing old files */
|
||||
currency = gnc_commodity_import_legacy(book, DEFAULT_CURRENCY);
|
||||
DxaccAccountSetCurrency (acc, currency);
|
||||
@@ -759,12 +761,13 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
/* aux account info first appears in version ten files */
|
||||
if (10 <= token) {
|
||||
if(!readAccInfo(fd, acc, token)) {
|
||||
LEAVE("");
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
err = read( fd, &numTrans, sizeof(int) );
|
||||
if( err != sizeof(int) ) { return NULL; }
|
||||
if( err != sizeof(int) ) { LEAVE(""); return NULL; }
|
||||
XACC_FLIP_INT (numTrans);
|
||||
|
||||
DEBUG ("expecting %d transactions", numTrans);
|
||||
@@ -793,6 +796,7 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
int numGrps;
|
||||
err = read( fd, &numGrps, sizeof(int) );
|
||||
if( err != sizeof(int) ) {
|
||||
LEAVE("");
|
||||
return NULL;
|
||||
}
|
||||
XACC_FLIP_INT (numGrps);
|
||||
@@ -803,6 +807,7 @@ readAccount( QofBook *book, int fd, AccountGroup *grp, int token )
|
||||
|
||||
xaccAccountCommitEdit (acc);
|
||||
|
||||
LEAVE("");
|
||||
return acc;
|
||||
}
|
||||
|
||||
|
||||
@@ -410,20 +410,20 @@ gnc_counter_sixtp_parser_create(void)
|
||||
}
|
||||
|
||||
static void
|
||||
print_counter_data(load_counter *data)
|
||||
debug_print_counter_data(load_counter *data)
|
||||
{
|
||||
PINFO("Transactions: Total: %d, Loaded: %d",
|
||||
data->transactions_total, data->transactions_loaded);
|
||||
PINFO("Accounts: Total: %d, Loaded: %d",
|
||||
data->accounts_total, data->accounts_loaded);
|
||||
PINFO("Books: Total: %d, Loaded: %d",
|
||||
data->books_total, data->books_loaded);
|
||||
PINFO("Commodities: Total: %d, Loaded: %d",
|
||||
data->commodities_total, data->commodities_loaded);
|
||||
PINFO("Scheduled Tansactions: Total: %d, Loaded: %d",
|
||||
data->schedXactions_total, data->schedXactions_loaded);
|
||||
PINFO("Budgets: Total: %d, Loaded: %d",
|
||||
data->budgets_total, data->budgets_loaded);
|
||||
DEBUG("Transactions: Total: %d, Loaded: %d",
|
||||
data->transactions_total, data->transactions_loaded);
|
||||
DEBUG("Accounts: Total: %d, Loaded: %d",
|
||||
data->accounts_total, data->accounts_loaded);
|
||||
DEBUG("Books: Total: %d, Loaded: %d",
|
||||
data->books_total, data->books_loaded);
|
||||
DEBUG("Commodities: Total: %d, Loaded: %d",
|
||||
data->commodities_total, data->commodities_loaded);
|
||||
DEBUG("Scheduled Tansactions: Total: %d, Loaded: %d",
|
||||
data->schedXactions_total, data->schedXactions_loaded);
|
||||
DEBUG("Budgets: Total: %d, Loaded: %d",
|
||||
data->budgets_total, data->budgets_loaded);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -728,7 +728,7 @@ qof_session_load_from_xml_file_v2_full(
|
||||
xaccEnableDataScrubbing();
|
||||
goto bail;
|
||||
}
|
||||
DEBUGCMD (print_counter_data(&gd->counter));
|
||||
debug_print_counter_data(&gd->counter);
|
||||
|
||||
/* destroy the parser */
|
||||
sixtp_destroy (top_parser);
|
||||
|
||||
@@ -150,9 +150,9 @@ main (int argc, char ** argv)
|
||||
{
|
||||
qof_init();
|
||||
cashobjects_register();
|
||||
qof_log_init_filename("/tmp/gnctest.trace");
|
||||
qof_log_set_default(QOF_LOG_DETAIL);
|
||||
qof_log_set_level(GNC_MOD_PRICE, QOF_LOG_DETAIL);
|
||||
//qof_log_init_filename("/tmp/gnctest.trace");
|
||||
//qof_log_set_default(QOF_LOG_DETAIL);
|
||||
//qof_log_set_level(GNC_MOD_PRICE, QOF_LOG_DETAIL);
|
||||
session = qof_session_new ();
|
||||
test_generation ();
|
||||
print_test_results ();
|
||||
|
||||
@@ -510,7 +510,7 @@ pgendFillOutToCheckpoint (PGBackend *be, const char *query_string)
|
||||
qd.resolve_list = NULL;
|
||||
|
||||
ENTER (" ");
|
||||
if (!be) return;
|
||||
if (!be) { LEAVE(""); return; }
|
||||
|
||||
if (0 == ncalls) {
|
||||
START_CLOCK (9, "starting at level 0");
|
||||
@@ -656,7 +656,7 @@ pgendFillOutToCheckpoint (PGBackend *be, const char *query_string)
|
||||
qd.xaction_list = NULL;
|
||||
|
||||
REPORT_CLOCK (9, "done gathering at call %d", call_count);
|
||||
if (NULL == acct_list) return;
|
||||
if (NULL == acct_list) { LEAVE(""); return; }
|
||||
|
||||
/* OK, at this point, we have a list of accounts, including the
|
||||
* date of the earliest split in that account. Now, we need to
|
||||
@@ -2237,8 +2237,6 @@ pgend_session_begin (QofBackend *backend,
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
// DEBUGCMD (PQtrace(be->connection, stderr));
|
||||
|
||||
/* set the datestyle to something we can parse */
|
||||
p = "SET DATESTYLE='ISO';";
|
||||
SEND_QUERY (be,p, );
|
||||
|
||||
@@ -456,9 +456,9 @@ pgendAccountGetBalance (PGBackend *be, Account *acc, Timespec as_of_date)
|
||||
com = xaccAccountGetCommodity(acc);
|
||||
if (!com)
|
||||
{
|
||||
PERR ("account %s has no commodity",
|
||||
guid_to_string (xaccAccountGetGUID (acc)));
|
||||
return;
|
||||
PERR("account %s has no commodity",
|
||||
guid_to_string (xaccAccountGetGUID (acc)));
|
||||
return;
|
||||
}
|
||||
|
||||
chk.commodity = gnc_commodity_get_unique_name(com);
|
||||
@@ -475,13 +475,13 @@ pgendAccountGetBalance (PGBackend *be, Account *acc, Timespec as_of_date)
|
||||
rec_b = chk.reconciled_balance;
|
||||
deno = gnc_commodity_get_fraction (com);
|
||||
|
||||
DEBUGCMD({
|
||||
{
|
||||
char buf[80];
|
||||
gnc_timespec_to_iso8601_buff (chk.date_start, buf);
|
||||
PINFO("%s balance to %s baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " clr=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " rcn=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT,
|
||||
xaccAccountGetDescription (acc), buf,
|
||||
b, deno, cl_b, deno, rec_b, deno);
|
||||
});
|
||||
DEBUG("%s balance to %s baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " clr=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " rcn=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT,
|
||||
xaccAccountGetDescription (acc), buf,
|
||||
b, deno, cl_b, deno, rec_b, deno);
|
||||
}
|
||||
|
||||
/* add up loose entries since the checkpoint */
|
||||
pgendAccountGetPartialBalance (be, &chk);
|
||||
@@ -497,13 +497,13 @@ pgendAccountGetBalance (PGBackend *be, Account *acc, Timespec as_of_date)
|
||||
|
||||
xaccAccountSetStartingBalance (acc, baln, cleared_baln, reconciled_baln);
|
||||
|
||||
DEBUGCMD ({
|
||||
char buf[80];
|
||||
gnc_timespec_to_iso8601_buff (as_of_date, buf);
|
||||
LEAVE("be=%p %s %s baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " clr=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " rcn=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, be,
|
||||
xaccAccountGetDescription (acc), buf,
|
||||
b, deno, cl_b, deno, rec_b, deno);
|
||||
});
|
||||
{
|
||||
char buf[80];
|
||||
gnc_timespec_to_iso8601_buff (as_of_date, buf);
|
||||
LEAVE("be=%p %s %s baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " clr=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " rcn=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, be,
|
||||
xaccAccountGetDescription (acc), buf,
|
||||
b, deno, cl_b, deno, rec_b, deno);
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================================= */
|
||||
|
||||
@@ -509,7 +509,7 @@ test_raw_query(QofSession * session, Query * q)
|
||||
book = qof_session_get_book(session);
|
||||
be = (PGBackend *) qof_book_get_backend(book);
|
||||
|
||||
if (qof_log_check(log_module, QOF_LOG_DETAIL))
|
||||
if (qof_log_check(log_module, QOF_LOG_DEBUG))
|
||||
qof_query_print(qn);
|
||||
|
||||
sq = sqlQuery_new();
|
||||
|
||||
@@ -384,7 +384,10 @@ gnc_plugin_page_invoice_create_widget (GncPluginPage *plugin_page)
|
||||
page = GNC_PLUGIN_PAGE_INVOICE (plugin_page);
|
||||
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
|
||||
if (priv->widget != NULL)
|
||||
{
|
||||
LEAVE("");
|
||||
return priv->widget;
|
||||
}
|
||||
|
||||
priv->widget = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (priv->widget);
|
||||
@@ -407,6 +410,7 @@ gnc_plugin_page_invoice_create_widget (GncPluginPage *plugin_page)
|
||||
gnc_plugin_page_invoice_refresh_cb,
|
||||
NULL, page);
|
||||
|
||||
LEAVE("");
|
||||
return priv->widget;
|
||||
}
|
||||
|
||||
@@ -421,7 +425,10 @@ gnc_plugin_page_invoice_destroy_widget (GncPluginPage *plugin_page)
|
||||
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
|
||||
|
||||
if (priv->widget == NULL)
|
||||
{
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->component_manager_id) {
|
||||
gnc_unregister_gui_component(priv->component_manager_id);
|
||||
@@ -431,6 +438,7 @@ gnc_plugin_page_invoice_destroy_widget (GncPluginPage *plugin_page)
|
||||
gtk_widget_hide(priv->widget);
|
||||
gnc_invoice_window_destroy_cb(priv->widget, priv->iw);
|
||||
priv->widget = NULL;
|
||||
LEAVE("");
|
||||
}
|
||||
|
||||
/** Save enough information about this invoice page that it can be
|
||||
@@ -460,7 +468,7 @@ gnc_plugin_page_invoice_save_page (GncPluginPage *plugin_page,
|
||||
invoice = GNC_PLUGIN_PAGE_INVOICE(plugin_page);
|
||||
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(invoice);
|
||||
|
||||
gnc_invoice_save_page(priv->iw, key_file, group_name);
|
||||
gnc_invoice_save_page(priv->iw, key_file, group_name);
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
||||
@@ -487,7 +495,7 @@ gnc_plugin_page_invoice_recreate_page (GtkWidget *window,
|
||||
ENTER("key_file %p, group_name %s", key_file, group_name);
|
||||
|
||||
/* Create the new page. */
|
||||
page = gnc_invoice_recreate_page(key_file, group_name);
|
||||
page = gnc_invoice_recreate_page(key_file, group_name);
|
||||
|
||||
LEAVE(" ");
|
||||
return page;
|
||||
@@ -645,12 +653,15 @@ gnc_plugin_page_invoice_cmd_sort_changed (GtkAction *action,
|
||||
invoice_sort_type_t value;
|
||||
|
||||
ENTER("(action %p, radio action %p, plugin_page %p)",
|
||||
action, current, plugin_page);
|
||||
action, current, plugin_page);
|
||||
LEAVE("g_return testing...");
|
||||
|
||||
g_return_if_fail(GTK_IS_ACTION(action));
|
||||
g_return_if_fail(GTK_IS_RADIO_ACTION(current));
|
||||
g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
|
||||
|
||||
ENTER("...passed (action %p, radio action %p, plugin_page %p)",
|
||||
action, current, plugin_page);
|
||||
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
|
||||
value = gtk_radio_action_get_current_value(current);
|
||||
gnc_invoice_window_sort (priv->iw, value);
|
||||
|
||||
+1
-1
@@ -728,7 +728,7 @@ DxaccSplitSetSharePriceAndAmount (Split *s, double price, double amt)
|
||||
mark_split (s);
|
||||
qof_instance_set_dirty(QOF_INSTANCE(s));
|
||||
xaccTransCommitEdit(s->parent);
|
||||
|
||||
LEAVE("");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -163,6 +163,6 @@ void gnc_log_default(void)
|
||||
{
|
||||
qof_log_set_default(QOF_LOG_WARNING);
|
||||
qof_log_set_level(GNC_MOD_ROOT, QOF_LOG_WARNING);
|
||||
qof_log_set_level(GNC_MOD_TEST, QOF_LOG_TRACE);
|
||||
qof_log_set_level(GNC_MOD_TEST, QOF_LOG_DEBUG);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ gnc_hook_lookup (const gchar *name)
|
||||
|
||||
ENTER("name %s", name);
|
||||
if (gnc_hooks_list == NULL) {
|
||||
LEAVE("no hook lists");
|
||||
PINFO("no hook lists");
|
||||
gnc_hooks_init();
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,6 @@ gnc_preferences_add_page_internal (const gchar *filename,
|
||||
ENTER("file %s, widget %s, tab %s full page %d",
|
||||
filename, widgetname, tabname, full_page);
|
||||
|
||||
|
||||
add_in = g_malloc(sizeof(addition));
|
||||
if (add_in == NULL) {
|
||||
g_critical("Unable to allocate memory.\n");
|
||||
@@ -243,6 +242,7 @@ gnc_preferences_add_page_internal (const gchar *filename,
|
||||
g_free(add_in->widgetname);
|
||||
g_free(add_in->tabname);
|
||||
g_free(add_in);
|
||||
LEAVE("err");
|
||||
return;
|
||||
} else {
|
||||
add_ins = g_slist_append(add_ins, add_in);
|
||||
@@ -468,6 +468,7 @@ gnc_preferences_build_page (gpointer data,
|
||||
g_critical("The object name %s in file %s is not a GtkTable. It cannot "
|
||||
"be added to the preferences dialog.",
|
||||
add_in->widgetname, add_in->filename);
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
g_object_get(G_OBJECT(new_content), "n-columns", &cols, NULL);
|
||||
@@ -475,6 +476,7 @@ gnc_preferences_build_page (gpointer data,
|
||||
g_critical("The table %s in file %s does not have four columns. It cannot "
|
||||
"be added to the preferences dialog.",
|
||||
add_in->widgetname, add_in->filename);
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1493,8 +1495,8 @@ gnc_preferences_gconf_changed (GConfClient *client,
|
||||
DEBUG("bad value");
|
||||
widget = g_hash_table_find(table, gnc_prefs_nearest_match, group_name);
|
||||
if (widget) {
|
||||
DEBUG("forcing %s", gtk_widget_get_name(widget));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
|
||||
DEBUG("forcing %s", gtk_widget_get_name(widget));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
|
||||
}
|
||||
g_free(group_name);
|
||||
g_free(name);
|
||||
|
||||
@@ -134,12 +134,12 @@ gnc_embedded_window_open_page (GncEmbeddedWindow *window,
|
||||
{
|
||||
GncEmbeddedWindowPrivate *priv;
|
||||
|
||||
ENTER("window %p, page %p", window, page);
|
||||
g_return_if_fail (GNC_IS_EMBEDDED_WINDOW (window));
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));
|
||||
priv = GNC_EMBEDDED_WINDOW_GET_PRIVATE(window);
|
||||
g_return_if_fail (priv->page == NULL);
|
||||
|
||||
ENTER("window %p, page %p", window, page);
|
||||
priv->page = page;
|
||||
page->window = GTK_WIDGET(window);
|
||||
page->notebook_page = gnc_plugin_page_create_widget (page);
|
||||
@@ -159,12 +159,13 @@ gnc_embedded_window_close_page (GncEmbeddedWindow *window,
|
||||
{
|
||||
GncEmbeddedWindowPrivate *priv;
|
||||
|
||||
ENTER("window %p, page %p", window, page);
|
||||
g_return_if_fail (GNC_IS_EMBEDDED_WINDOW (window));
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));
|
||||
priv = GNC_EMBEDDED_WINDOW_GET_PRIVATE(window);
|
||||
g_return_if_fail (priv->page == page);
|
||||
|
||||
ENTER("window %p, page %p", window, page);
|
||||
|
||||
if (!page->notebook_page) {
|
||||
LEAVE("no displayed widget");
|
||||
return;
|
||||
@@ -248,10 +249,10 @@ gnc_embedded_window_finalize (GObject *object)
|
||||
GncEmbeddedWindow *window;
|
||||
GncEmbeddedWindowPrivate *priv;
|
||||
|
||||
ENTER("object %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_EMBEDDED_WINDOW (object));
|
||||
|
||||
ENTER("object %p", object);
|
||||
window = GNC_EMBEDDED_WINDOW (object);
|
||||
priv = GNC_EMBEDDED_WINDOW_GET_PRIVATE(window);
|
||||
|
||||
@@ -271,10 +272,10 @@ gnc_embedded_window_dispose (GObject *object)
|
||||
GncEmbeddedWindow *window;
|
||||
GncEmbeddedWindowPrivate *priv;
|
||||
|
||||
ENTER("object %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_EMBEDDED_WINDOW (object));
|
||||
|
||||
ENTER("object %p", object);
|
||||
window = GNC_EMBEDDED_WINDOW (object);
|
||||
priv = GNC_EMBEDDED_WINDOW_GET_PRIVATE(window);
|
||||
if (priv->page) {
|
||||
@@ -382,7 +383,7 @@ gnc_embedded_window_new (const gchar *action_group_name,
|
||||
g_critical("Failed to load ui file.\n Filename %s\n Error %s",
|
||||
ui_fullname, error->message);
|
||||
g_error_free(error);
|
||||
g_free(ui_fullname);
|
||||
g_free(ui_fullname);
|
||||
LEAVE("window %p", window);
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -356,17 +356,20 @@ gnc_plugin_add_actions (GtkUIManager *ui_merge,
|
||||
gchar *pathname;
|
||||
gint merge_id;
|
||||
|
||||
ENTER("ui_merge %p, action_group %p, filename %s",
|
||||
ui_merge, action_group, filename);
|
||||
g_return_val_if_fail (ui_merge, 0);
|
||||
g_return_val_if_fail (action_group, 0);
|
||||
g_return_val_if_fail (filename, 0);
|
||||
|
||||
ENTER("ui_merge %p, action_group %p, filename %s",
|
||||
ui_merge, action_group, filename);
|
||||
gtk_ui_manager_insert_action_group (ui_merge, action_group, 0);
|
||||
|
||||
pathname = gnc_gnome_locate_ui_file (filename);
|
||||
if (pathname == NULL)
|
||||
return 0;
|
||||
{
|
||||
LEAVE("fail");
|
||||
return 0;
|
||||
}
|
||||
|
||||
merge_id = gtk_ui_manager_add_ui_from_file (ui_merge, pathname, &error);
|
||||
DEBUG("merge_id is %d", merge_id);
|
||||
|
||||
@@ -224,10 +224,11 @@ gnc_tree_model_account_finalize (GObject *object)
|
||||
GncTreeModelAccountPrivate *priv;
|
||||
GncTreeModelAccount *model;
|
||||
|
||||
ENTER("model %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (object));
|
||||
|
||||
ENTER("model %p", object);
|
||||
|
||||
model = GNC_TREE_MODEL_ACCOUNT (object);
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
|
||||
@@ -248,10 +249,11 @@ gnc_tree_model_account_dispose (GObject *object)
|
||||
GncTreeModelAccountPrivate *priv;
|
||||
GncTreeModelAccount *model;
|
||||
|
||||
ENTER("model %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (object));
|
||||
|
||||
ENTER("model %p", object);
|
||||
|
||||
model = GNC_TREE_MODEL_ACCOUNT (object);
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
|
||||
@@ -445,12 +447,13 @@ gnc_tree_model_account_get_iter (GtkTreeModel *tree_model,
|
||||
AccountGroup *group = NULL, *children;
|
||||
gint i = 0, *indices;
|
||||
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
|
||||
{
|
||||
gchar *path_string = gtk_tree_path_to_string(path);
|
||||
ENTER("model %p, iter %p, path %s", tree_model, iter, path_string);
|
||||
g_free(path_string);
|
||||
}
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
|
||||
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
@@ -518,12 +521,13 @@ gnc_tree_model_account_get_path (GtkTreeModel *tree_model,
|
||||
gint i;
|
||||
gboolean found, finished = FALSE;
|
||||
|
||||
ENTER("model %p, iter %s", model, iter_to_string(iter));
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model), NULL);
|
||||
g_return_val_if_fail (iter != NULL, NULL);
|
||||
g_return_val_if_fail (iter->user_data != NULL, NULL);
|
||||
g_return_val_if_fail (iter->stamp == model->stamp, NULL);
|
||||
|
||||
ENTER("model %p, iter %s", model, iter_to_string(iter));
|
||||
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
if (priv->root == NULL) {
|
||||
LEAVE("failed (1)");
|
||||
@@ -639,13 +643,14 @@ gnc_tree_model_account_get_value (GtkTreeModel *tree_model,
|
||||
gboolean negative; /* used to set "deficit style" aka red numbers */
|
||||
gchar *string;
|
||||
|
||||
ENTER("model %p, iter %s, col %d", tree_model,
|
||||
iter_to_string(iter), column);
|
||||
g_return_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model));
|
||||
g_return_if_fail (iter != NULL);
|
||||
g_return_if_fail (iter->user_data != NULL);
|
||||
g_return_if_fail (iter->stamp == model->stamp);
|
||||
|
||||
ENTER("model %p, iter %s, col %d", tree_model,
|
||||
iter_to_string(iter), column);
|
||||
|
||||
account = (Account *) iter->user_data;
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
|
||||
@@ -854,12 +859,13 @@ gnc_tree_model_account_iter_next (GtkTreeModel *tree_model,
|
||||
AccountGroup *group;
|
||||
gint i;
|
||||
|
||||
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model), FALSE);
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->stamp == model->stamp, FALSE);
|
||||
|
||||
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
|
||||
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
if (iter->user_data == priv->toplevel) {
|
||||
iter->stamp = 0;
|
||||
@@ -902,13 +908,9 @@ gnc_tree_model_account_iter_children (GtkTreeModel *tree_model,
|
||||
Account *account;
|
||||
AccountGroup *group;
|
||||
|
||||
if (parent) {
|
||||
ENTER("model %p, iter %p (to be filed in), parent %s",
|
||||
tree_model, iter, iter_to_string(parent));
|
||||
} else {
|
||||
ENTER("model %p, iter %p (to be filed in), parent (null)", tree_model, iter);
|
||||
}
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
ENTER("model %p, iter %p (to be filed in), parent %s",
|
||||
tree_model, iter, (parent ? iter_to_string(parent) : "(null)"));
|
||||
|
||||
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
@@ -933,14 +935,14 @@ gnc_tree_model_account_iter_children (GtkTreeModel *tree_model,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (parent == NULL) {
|
||||
account = xaccGroupGetAccount (priv->root, 0);
|
||||
|
||||
if (account == NULL) {
|
||||
iter->stamp = 0;
|
||||
LEAVE("failed (couldn't get account from group)");
|
||||
return FALSE;
|
||||
}
|
||||
if (parent == NULL) {
|
||||
account = xaccGroupGetAccount (priv->root, 0);
|
||||
|
||||
if (account == NULL) {
|
||||
iter->stamp = 0;
|
||||
LEAVE("failed (couldn't get account from group)");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
iter->user_data = account;
|
||||
iter->user_data2 = priv->root;
|
||||
@@ -950,9 +952,9 @@ gnc_tree_model_account_iter_children (GtkTreeModel *tree_model,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_return_val_if_fail (parent != NULL, FALSE);
|
||||
g_return_val_if_fail (parent->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (parent->stamp == model->stamp, FALSE);
|
||||
gnc_leave_return_val_if_fail (parent != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (parent->user_data != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (parent->stamp == model->stamp, FALSE);
|
||||
|
||||
group = xaccAccountGetChildren ((Account *) parent->user_data);
|
||||
|
||||
@@ -987,15 +989,16 @@ gnc_tree_model_account_iter_has_child (GtkTreeModel *tree_model,
|
||||
GncTreeModelAccountPrivate *priv;
|
||||
AccountGroup *group;
|
||||
|
||||
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
|
||||
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
|
||||
|
||||
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->stamp == model->stamp, FALSE);
|
||||
gnc_leave_return_val_if_fail (iter != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (iter->user_data != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (iter->stamp == model->stamp, FALSE);
|
||||
|
||||
if (iter->user_data == priv->toplevel) {
|
||||
group = priv->root;
|
||||
@@ -1020,8 +1023,8 @@ gnc_tree_model_account_iter_n_children (GtkTreeModel *tree_model,
|
||||
GncTreeModelAccountPrivate *priv;
|
||||
AccountGroup *group;
|
||||
|
||||
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
|
||||
|
||||
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
@@ -1036,9 +1039,9 @@ gnc_tree_model_account_iter_n_children (GtkTreeModel *tree_model,
|
||||
}
|
||||
}
|
||||
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->stamp == model->stamp, FALSE);
|
||||
gnc_leave_return_val_if_fail (iter != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (iter->user_data != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (iter->stamp == model->stamp, FALSE);
|
||||
|
||||
if (priv->toplevel == iter->user_data) {
|
||||
group = priv->root;
|
||||
@@ -1063,7 +1066,6 @@ gnc_tree_model_account_iter_nth_child (GtkTreeModel *tree_model,
|
||||
|
||||
if (parent) {
|
||||
gchar *parent_string;
|
||||
|
||||
parent_string = strdup(iter_to_string(parent));
|
||||
ENTER("model %p, iter %s, parent %s, n %d",
|
||||
tree_model, iter_to_string(iter),
|
||||
@@ -1073,7 +1075,7 @@ gnc_tree_model_account_iter_nth_child (GtkTreeModel *tree_model,
|
||||
ENTER("model %p, iter %s, parent (null), n %d",
|
||||
tree_model, iter_to_string(iter), n);
|
||||
}
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
gnc_leave_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
|
||||
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
@@ -1110,8 +1112,8 @@ gnc_tree_model_account_iter_nth_child (GtkTreeModel *tree_model,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_return_val_if_fail (parent->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (parent->stamp == model->stamp, FALSE);
|
||||
gnc_leave_return_val_if_fail (parent->user_data != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (parent->stamp == model->stamp, FALSE);
|
||||
|
||||
if (priv->toplevel == parent->user_data) {
|
||||
group = priv->root;
|
||||
@@ -1164,14 +1166,14 @@ gnc_tree_model_account_iter_parent (GtkTreeModel *tree_model,
|
||||
ENTER("model %p, iter %s, child (null)",
|
||||
tree_model, iter_to_string(iter));
|
||||
}
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
gnc_leave_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
|
||||
|
||||
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
|
||||
g_return_val_if_fail (child != NULL, FALSE);
|
||||
g_return_val_if_fail (child->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (child->stamp == model->stamp, FALSE);
|
||||
gnc_leave_return_val_if_fail (child != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (child->user_data != NULL, FALSE);
|
||||
gnc_leave_return_val_if_fail (child->stamp == model->stamp, FALSE);
|
||||
|
||||
account = (Account *) child->user_data;
|
||||
|
||||
@@ -1239,7 +1241,10 @@ account_row_inserted (Account *account,
|
||||
account, xaccAccountGetName(account), data);
|
||||
if (!gnc_tree_model_account_get_iter_from_account
|
||||
(GNC_TREE_MODEL_ACCOUNT (data), account, &iter))
|
||||
return NULL;
|
||||
{
|
||||
LEAVE("");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL (data), &iter);
|
||||
|
||||
@@ -1280,7 +1285,7 @@ gnc_tree_model_account_set_toplevel (GncTreeModelAccount *model,
|
||||
GtkTreeIter iter;
|
||||
|
||||
ENTER("model %p, toplevel %p", model, toplevel);
|
||||
g_return_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model));
|
||||
gnc_leave_return_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model));
|
||||
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
DEBUG("old toplevel %p", priv->toplevel);
|
||||
@@ -1353,10 +1358,10 @@ gnc_tree_model_account_get_iter_from_account (GncTreeModelAccount *model,
|
||||
gint i;
|
||||
|
||||
ENTER("model %p, account %p, iter %p", model, account, iter);
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model), FALSE);
|
||||
g_return_val_if_fail ((account != NULL), FALSE);
|
||||
g_return_val_if_fail ((iter != NULL), FALSE);
|
||||
|
||||
gnc_leave_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model), FALSE);
|
||||
gnc_leave_return_val_if_fail ((account != NULL), FALSE);
|
||||
gnc_leave_return_val_if_fail ((iter != NULL), FALSE);
|
||||
|
||||
iter->user_data = account;
|
||||
iter->stamp = model->stamp;
|
||||
|
||||
@@ -1402,8 +1407,8 @@ gnc_tree_model_account_get_path_from_account (GncTreeModelAccount *model,
|
||||
GtkTreePath *tree_path;
|
||||
|
||||
ENTER("model %p, account %p", model, account);
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model), NULL);
|
||||
g_return_val_if_fail (account != NULL, NULL);
|
||||
gnc_leave_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (model), NULL);
|
||||
gnc_leave_return_val_if_fail (account != NULL, NULL);
|
||||
|
||||
if (!gnc_tree_model_account_get_iter_from_account (model, account,
|
||||
&tree_iter)) {
|
||||
@@ -1517,13 +1522,13 @@ gnc_tree_model_account_event_handler (QofEntity *entity,
|
||||
DEBUG("add account %p (%s)", account, xaccAccountGetName(account));
|
||||
path = gnc_tree_model_account_get_path_from_account(model, account);
|
||||
if (!path) {
|
||||
DEBUG("can't generate path");
|
||||
break;
|
||||
DEBUG("can't generate path");
|
||||
break;
|
||||
}
|
||||
increment_stamp(model);
|
||||
if (!gnc_tree_model_account_get_iter(GTK_TREE_MODEL(model), &iter, path)) {
|
||||
DEBUG("can't generate iter");
|
||||
break;
|
||||
DEBUG("can't generate iter");
|
||||
break;
|
||||
}
|
||||
gtk_tree_model_row_inserted (GTK_TREE_MODEL(model), path, &iter);
|
||||
propagate_change(GTK_TREE_MODEL(model), path, 1);
|
||||
@@ -1531,14 +1536,14 @@ gnc_tree_model_account_event_handler (QofEntity *entity,
|
||||
|
||||
case QOF_EVENT_REMOVE:
|
||||
if (!ed) /* Required for a remove. */
|
||||
break;
|
||||
break;
|
||||
parent = ed->node ? GNC_ACCOUNT(ed->node) : priv->toplevel;
|
||||
parent_name = ed->node ? xaccAccountGetName(parent) : "Root";
|
||||
DEBUG("remove child %d of account %p (%s)", ed->idx, parent, parent_name);
|
||||
path = gnc_tree_model_account_get_path_from_account(model, parent);
|
||||
if (!path) {
|
||||
DEBUG("can't generate path");
|
||||
break;
|
||||
DEBUG("can't generate path");
|
||||
break;
|
||||
}
|
||||
increment_stamp(model);
|
||||
gtk_tree_path_append_index (path, ed->idx);
|
||||
@@ -1550,19 +1555,19 @@ gnc_tree_model_account_event_handler (QofEntity *entity,
|
||||
DEBUG("modify account %p (%s)", account, xaccAccountGetName(account));
|
||||
path = gnc_tree_model_account_get_path_from_account(model, account);
|
||||
if (!path) {
|
||||
DEBUG("can't generate path");
|
||||
break;
|
||||
DEBUG("can't generate path");
|
||||
break;
|
||||
}
|
||||
if (!gnc_tree_model_account_get_iter(GTK_TREE_MODEL(model), &iter, path)) {
|
||||
DEBUG("can't generate iter");
|
||||
break;
|
||||
DEBUG("can't generate iter");
|
||||
break;
|
||||
}
|
||||
gtk_tree_model_row_changed(GTK_TREE_MODEL(model), path, &iter);
|
||||
propagate_change(GTK_TREE_MODEL(model), path, -1);
|
||||
break;
|
||||
|
||||
default:
|
||||
DEBUG("unknown event type");
|
||||
LEAVE("unknown event type");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -164,11 +164,11 @@ gnc_tree_model_commodity_finalize (GObject *object)
|
||||
GncTreeModelCommodity *model;
|
||||
GncTreeModelCommodityPrivate *priv;
|
||||
|
||||
ENTER("model %p", object);
|
||||
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_TREE_MODEL_COMMODITY (object));
|
||||
|
||||
ENTER("model %p", object);
|
||||
|
||||
model = GNC_TREE_MODEL_COMMODITY (object);
|
||||
priv = GNC_TREE_MODEL_COMMODITY_GET_PRIVATE(model);
|
||||
priv->book = NULL;
|
||||
@@ -184,10 +184,10 @@ gnc_tree_model_commodity_dispose (GObject *object)
|
||||
GncTreeModelCommodity *model;
|
||||
GncTreeModelCommodityPrivate *priv;
|
||||
|
||||
ENTER("model %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_TREE_MODEL_COMMODITY (object));
|
||||
|
||||
ENTER("model %p", object);
|
||||
model = GNC_TREE_MODEL_COMMODITY (object);
|
||||
priv = GNC_TREE_MODEL_COMMODITY_GET_PRIVATE(model);
|
||||
|
||||
@@ -208,6 +208,8 @@ gnc_tree_model_commodity_new (QofBook *book, gnc_commodity_table *ct)
|
||||
GncTreeModelCommodityPrivate *priv;
|
||||
const GList *item;
|
||||
|
||||
ENTER("");
|
||||
|
||||
item = gnc_gobject_tracking_get_list(GNC_TREE_MODEL_COMMODITY_NAME);
|
||||
for ( ; item; item = g_list_next(item)) {
|
||||
model = (GncTreeModelCommodity *)item->data;
|
||||
@@ -227,6 +229,7 @@ gnc_tree_model_commodity_new (QofBook *book, gnc_commodity_table *ct)
|
||||
priv->event_handler_id =
|
||||
qof_event_register_handler (gnc_tree_model_commodity_event_handler, model);
|
||||
|
||||
LEAVE("");
|
||||
return GTK_TREE_MODEL (model);
|
||||
}
|
||||
|
||||
@@ -447,7 +450,10 @@ gnc_tree_model_commodity_get_iter (GtkTreeModel *tree_model,
|
||||
|
||||
list = gnc_commodity_table_get_namespaces_list(ct);
|
||||
i = gtk_tree_path_get_indices (path)[0];
|
||||
g_return_val_if_fail (i >= 0 && i < g_list_length (list), FALSE);
|
||||
{
|
||||
if (!(i >= 0 && i < g_list_length (list))) { LEAVE(""); }
|
||||
g_return_val_if_fail (i >= 0 && i < g_list_length (list), FALSE);
|
||||
}
|
||||
namespace = g_list_nth_data (list, i);
|
||||
|
||||
if (depth == 1) {
|
||||
@@ -461,7 +467,10 @@ gnc_tree_model_commodity_get_iter (GtkTreeModel *tree_model,
|
||||
|
||||
list = gnc_commodity_namespace_get_commodity_list(namespace);
|
||||
i = gtk_tree_path_get_indices (path)[1];
|
||||
g_return_val_if_fail (i >= 0 && i < g_list_length (list), FALSE);
|
||||
{
|
||||
if (!(i >= 0 && i < g_list_length (list))) { LEAVE(""); }
|
||||
g_return_val_if_fail (i >= 0 && i < g_list_length (list), FALSE);
|
||||
}
|
||||
commodity = g_list_nth_data (list, i);
|
||||
|
||||
iter->stamp = model->stamp;
|
||||
@@ -483,13 +492,13 @@ gnc_tree_model_commodity_get_path (GtkTreeModel *tree_model,
|
||||
gnc_commodity_namespace *namespace;
|
||||
GList *ns_list;
|
||||
|
||||
ENTER("model %p, iter %p (%s)", tree_model, iter, iter_to_string(iter));
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (tree_model), NULL);
|
||||
model = GNC_TREE_MODEL_COMMODITY (tree_model);
|
||||
g_return_val_if_fail (iter != NULL, NULL);
|
||||
g_return_val_if_fail (iter->user_data != NULL, NULL);
|
||||
g_return_val_if_fail (iter->user_data2 != NULL, NULL);
|
||||
g_return_val_if_fail (iter->stamp == model->stamp, NULL);
|
||||
ENTER("model %p, iter %p (%s)", tree_model, iter, iter_to_string(iter));
|
||||
|
||||
priv = GNC_TREE_MODEL_COMMODITY_GET_PRIVATE(model);
|
||||
ct = priv->commodity_table;
|
||||
@@ -640,7 +649,6 @@ gnc_tree_model_commodity_iter_next (GtkTreeModel *tree_model,
|
||||
GList *list;
|
||||
int n;
|
||||
|
||||
ENTER("model %p, iter %p(%s)", tree_model, iter, iter_to_string(iter));
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (tree_model), FALSE);
|
||||
model = GNC_TREE_MODEL_COMMODITY (tree_model);
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
@@ -648,6 +656,7 @@ gnc_tree_model_commodity_iter_next (GtkTreeModel *tree_model,
|
||||
g_return_val_if_fail (iter->user_data2 != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->stamp == model->stamp, FALSE);
|
||||
|
||||
ENTER("model %p, iter %p(%s)", tree_model, iter, iter_to_string(iter));
|
||||
priv = GNC_TREE_MODEL_COMMODITY_GET_PRIVATE(model);
|
||||
if (iter->user_data == ITER_IS_NAMESPACE) {
|
||||
ct = priv->commodity_table;
|
||||
@@ -733,9 +742,9 @@ gnc_tree_model_commodity_iter_has_child (GtkTreeModel *tree_model,
|
||||
gnc_commodity_namespace *namespace;
|
||||
GList *list;
|
||||
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
ENTER("model %p, iter %p (%s)", tree_model,
|
||||
iter, iter_to_string(iter));
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
|
||||
if (iter->user_data != ITER_IS_NAMESPACE) {
|
||||
LEAVE("no children (not ns)");
|
||||
@@ -886,11 +895,12 @@ gnc_tree_model_commodity_get_iter_from_commodity (GncTreeModelCommodity *model,
|
||||
GList *list;
|
||||
gint n;
|
||||
|
||||
ENTER("model %p, commodity %p, iter %p", model, commodity, iter);
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (model), FALSE);
|
||||
g_return_val_if_fail ((commodity != NULL), FALSE);
|
||||
g_return_val_if_fail ((iter != NULL), FALSE);
|
||||
|
||||
ENTER("model %p, commodity %p, iter %p", model, commodity, iter);
|
||||
|
||||
namespace = gnc_commodity_get_namespace_ds(commodity);
|
||||
if (namespace == NULL) {
|
||||
LEAVE("no namespace");
|
||||
@@ -929,9 +939,9 @@ gnc_tree_model_commodity_get_path_from_commodity (GncTreeModelCommodity *model,
|
||||
GtkTreeIter tree_iter;
|
||||
GtkTreePath *tree_path;
|
||||
|
||||
ENTER("model %p, commodity %p", model, commodity);
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (model), NULL);
|
||||
g_return_val_if_fail (commodity != NULL, NULL);
|
||||
ENTER("model %p, commodity %p", model, commodity);
|
||||
|
||||
if (!gnc_tree_model_commodity_get_iter_from_commodity (model, commodity, &tree_iter)) {
|
||||
LEAVE("no iter");
|
||||
@@ -963,19 +973,26 @@ gnc_tree_model_commodity_get_iter_from_namespace (GncTreeModelCommodity *model,
|
||||
GList *list;
|
||||
gint n;
|
||||
|
||||
ENTER("model %p, namespace %p, iter %p", model, namespace, iter);
|
||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (model), FALSE);
|
||||
g_return_val_if_fail ((namespace != NULL), FALSE);
|
||||
g_return_val_if_fail ((iter != NULL), FALSE);
|
||||
|
||||
ENTER("model %p, namespace %p, iter %p", model, namespace, iter);
|
||||
|
||||
priv = GNC_TREE_MODEL_COMMODITY_GET_PRIVATE(model);
|
||||
list = gnc_commodity_table_get_namespaces_list(priv->commodity_table);
|
||||
if (list == NULL)
|
||||
{
|
||||
LEAVE("");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
n = g_list_index(list, namespace);
|
||||
if (n == -1)
|
||||
{
|
||||
LEAVE("");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
iter->stamp = model->stamp;
|
||||
iter->user_data = ITER_IS_NAMESPACE;
|
||||
@@ -1114,10 +1131,10 @@ gnc_tree_model_commodity_path_deleted (GncTreeModelCommodity *model,
|
||||
gtk_tree_model_row_changed (GTK_TREE_MODEL(model), path, &iter);
|
||||
namespace = gnc_tree_model_commodity_get_namespace (model, &iter);
|
||||
if (namespace) {
|
||||
list = gnc_commodity_namespace_get_commodity_list(namespace);
|
||||
if (g_list_length(list) == 0) {
|
||||
gtk_tree_model_row_has_child_toggled(GTK_TREE_MODEL(model), path, &iter);
|
||||
}
|
||||
list = gnc_commodity_namespace_get_commodity_list(namespace);
|
||||
if (g_list_length(list) == 0) {
|
||||
gtk_tree_model_row_has_child_toggled(GTK_TREE_MODEL(model), path, &iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1206,13 +1223,14 @@ gnc_tree_model_commodity_event_handler (QofEntity *entity,
|
||||
remove_data *data;
|
||||
const gchar *name;
|
||||
|
||||
ENTER("entity %p, event %d, model %p, event data %p",
|
||||
entity, event_type, user_data, event_data);
|
||||
model = (GncTreeModelCommodity *)user_data;
|
||||
|
||||
/* hard failures */
|
||||
g_return_if_fail(GNC_IS_TREE_MODEL_COMMODITY(model));
|
||||
|
||||
ENTER("entity %p, event %d, model %p, event data %p",
|
||||
entity, event_type, user_data, event_data);
|
||||
|
||||
/* get type specific data */
|
||||
if (GNC_IS_COMMODITY(entity)) {
|
||||
gnc_commodity *commodity;
|
||||
@@ -1237,6 +1255,7 @@ gnc_tree_model_commodity_event_handler (QofEntity *entity,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,10 +125,10 @@ gnc_tree_view_commodity_finalize (GObject *object)
|
||||
GncTreeViewCommodity *view;
|
||||
GncTreeViewCommodityPrivate *priv;
|
||||
|
||||
ENTER("view %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_TREE_VIEW_COMMODITY (object));
|
||||
|
||||
ENTER("view %p", object);
|
||||
view = GNC_TREE_VIEW_COMMODITY (object);
|
||||
priv = GNC_TREE_VIEW_COMMODITY_GET_PRIVATE (view);
|
||||
|
||||
@@ -142,10 +142,10 @@ gnc_tree_view_commodity_destroy (GtkObject *object)
|
||||
{
|
||||
GncTreeViewCommodity *view;
|
||||
|
||||
ENTER("view %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_TREE_VIEW_COMMODITY (object));
|
||||
|
||||
ENTER("view %p", object);
|
||||
view = GNC_TREE_VIEW_COMMODITY (object);
|
||||
|
||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||
@@ -697,12 +697,12 @@ gnc_tree_view_commodity_set_filter (GncTreeViewCommodity *view,
|
||||
GtkTreeModel *f_model, *s_model;
|
||||
filter_user_data *fd = data;
|
||||
|
||||
ENTER("view %p, ns func %p, cm func %p, data %p, destroy %p",
|
||||
view, ns_func, cm_func, data, destroy);
|
||||
|
||||
g_return_if_fail(GNC_IS_TREE_VIEW_COMMODITY(view));
|
||||
g_return_if_fail((ns_func != NULL) || (cm_func != NULL));
|
||||
|
||||
ENTER("view %p, ns func %p, cm func %p, data %p, destroy %p",
|
||||
view, ns_func, cm_func, data, destroy);
|
||||
|
||||
fd = g_malloc(sizeof(filter_user_data));
|
||||
fd->user_ns_fn = ns_func;
|
||||
fd->user_cm_fn = cm_func;
|
||||
@@ -730,10 +730,9 @@ gnc_tree_view_commodity_refilter (GncTreeViewCommodity *view)
|
||||
{
|
||||
GtkTreeModel *f_model, *s_model;
|
||||
|
||||
ENTER("view %p", view);
|
||||
|
||||
g_return_if_fail(GNC_IS_TREE_VIEW_COMMODITY(view));
|
||||
|
||||
ENTER("view %p", view);
|
||||
s_model = gtk_tree_view_get_model (GTK_TREE_VIEW(view));
|
||||
f_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (s_model));
|
||||
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (f_model));
|
||||
@@ -758,10 +757,10 @@ gnc_tree_view_commodity_get_commodity_from_path (GncTreeViewCommodity *view,
|
||||
GtkTreeIter iter;
|
||||
gnc_commodity *commodity;
|
||||
|
||||
ENTER("view %p", view);
|
||||
g_return_val_if_fail (GNC_IS_TREE_VIEW_COMMODITY (view), NULL);
|
||||
g_return_val_if_fail (s_path != NULL, NULL);
|
||||
|
||||
ENTER("view %p", view);
|
||||
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
||||
f_path = gtk_tree_model_sort_convert_path_to_child_path (GTK_TREE_MODEL_SORT (s_model), s_path);
|
||||
if (!f_path) {
|
||||
@@ -802,9 +801,10 @@ gnc_tree_view_commodity_get_selected_commodity (GncTreeViewCommodity *view)
|
||||
GtkTreeIter iter, f_iter, s_iter;
|
||||
gnc_commodity *commodity;
|
||||
|
||||
ENTER("view %p", view);
|
||||
g_return_val_if_fail (GNC_IS_TREE_VIEW_COMMODITY (view), NULL);
|
||||
|
||||
ENTER("view %p", view);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view));
|
||||
if (!gtk_tree_selection_get_selected (selection, &s_model, &s_iter)) {
|
||||
LEAVE("no commodity, get_selected failed");
|
||||
@@ -845,7 +845,10 @@ gnc_tree_view_commodity_set_selected_commodity (GncTreeViewCommodity *view,
|
||||
gtk_tree_selection_unselect_all (selection);
|
||||
|
||||
if (commodity == NULL)
|
||||
{
|
||||
LEAVE("");
|
||||
return;
|
||||
}
|
||||
|
||||
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
||||
f_model = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(s_model));
|
||||
@@ -1016,9 +1019,9 @@ gnc_tree_view_commodity_get_cursor_account (GncTreeViewCommodity *view)
|
||||
GtkTreePath *s_path;
|
||||
gnc_commodity *commodity;
|
||||
|
||||
ENTER("view %p", view);
|
||||
g_return_val_if_fail (GNC_IS_TREE_VIEW_COMMODITY (view), NULL);
|
||||
|
||||
ENTER("view %p", view);
|
||||
s_model = gtk_tree_view_get_model (GTK_TREE_VIEW(view));
|
||||
gtk_tree_view_get_cursor (GTK_TREE_VIEW(view), &s_path, NULL);
|
||||
if (s_path) {
|
||||
|
||||
@@ -126,8 +126,8 @@ gnc_tree_view_price_finalize (GObject *object)
|
||||
GncTreeViewPricePrivate *priv;
|
||||
|
||||
ENTER("view %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_TREE_VIEW_PRICE (object));
|
||||
gnc_leave_return_if_fail (object != NULL);
|
||||
gnc_leave_return_if_fail (GNC_IS_TREE_VIEW_PRICE (object));
|
||||
|
||||
view = GNC_TREE_VIEW_PRICE (object);
|
||||
priv = GNC_TREE_VIEW_PRICE_GET_PRIVATE (view);
|
||||
@@ -143,8 +143,8 @@ gnc_tree_view_price_destroy (GtkObject *object)
|
||||
GncTreeViewPrice *view;
|
||||
|
||||
ENTER("view %p", object);
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GNC_IS_TREE_VIEW_PRICE (object));
|
||||
gnc_leave_return_if_fail (object != NULL);
|
||||
gnc_leave_return_if_fail (GNC_IS_TREE_VIEW_PRICE (object));
|
||||
|
||||
view = GNC_TREE_VIEW_PRICE (object);
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ void gnc_file_aqbanking_import (const gchar *aqbanking_importername,
|
||||
char *default_dir;
|
||||
int dtaus_fd;
|
||||
|
||||
/* qof_log_check(MOD_IMPORT, QOF_LOG_TRACE); */
|
||||
DEBUG("gnc_file_dtaus_import(): Begin...\n");
|
||||
|
||||
default_dir = gnc_get_default_directory(GCONF_SECTION);
|
||||
|
||||
@@ -329,12 +329,15 @@ main_window_to_account (GncMainWindow *window)
|
||||
Account *account = NULL;
|
||||
|
||||
ENTER("main window %p", window);
|
||||
if (!GNC_IS_MAIN_WINDOW(window)) { LEAVE(""); }
|
||||
g_return_val_if_fail (GNC_IS_MAIN_WINDOW (window), NULL);
|
||||
|
||||
/* Ensure we are called from a register page. */
|
||||
page = gnc_main_window_get_current_page(window);
|
||||
if (!GNC_IS_PLUGIN_PAGE(page)) { LEAVE(""); }
|
||||
g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), NULL);
|
||||
page_name = gnc_plugin_page_get_plugin_name(page);
|
||||
if (!g_return_val_if_fail(page_name)) { LEAVE(""); }
|
||||
g_return_val_if_fail (page_name, NULL);
|
||||
|
||||
if (safe_strcmp(page_name, GNC_PLUGIN_PAGE_REGISTER_NAME) == 0) {
|
||||
@@ -384,8 +387,10 @@ gnc_plugin_hbci_main_window_page_added (GncMainWindow *window,
|
||||
const gchar *page_name;
|
||||
|
||||
ENTER("main window %p, page %p", window, page);
|
||||
if (!GNC_IS_PLUGIN_PAGE(page)) { LEAVE(""); }
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));
|
||||
page_name = gnc_plugin_page_get_plugin_name(page);
|
||||
if (!page_name) { LEAVE(""); }
|
||||
g_return_if_fail (page_name);
|
||||
if (safe_strcmp(page_name, GNC_PLUGIN_PAGE_ACCOUNT_TREE_NAME) == 0) {
|
||||
DEBUG("account tree page, adding signal");
|
||||
@@ -409,8 +414,10 @@ gnc_plugin_hbci_main_window_page_changed (GncMainWindow *window,
|
||||
Account *account;
|
||||
|
||||
ENTER("main window %p, page %p", window, page);
|
||||
if (!GNC_IS_MAIN_WINDOW (window)) { LEAVE(""); }
|
||||
g_return_if_fail (GNC_IS_MAIN_WINDOW (window));
|
||||
action_group = gnc_main_window_get_action_group(window,PLUGIN_ACTIONS_NAME);
|
||||
if (!GTK_IS_ACTION_GROUP (action_group)) { LEAVE(""); }
|
||||
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
|
||||
|
||||
/* Reset everything to known state */
|
||||
|
||||
@@ -67,7 +67,7 @@ build_acct_tree(struct _accountpickerdialog * picker)
|
||||
GtkTreeViewColumn *col;
|
||||
|
||||
/* Build a new account tree */
|
||||
TRACE("Begin");
|
||||
DEBUG("Begin");
|
||||
account_tree = gnc_tree_view_account_new(FALSE);
|
||||
picker->account_tree = GNC_TREE_VIEW_ACCOUNT(account_tree);
|
||||
gtk_tree_view_set_headers_visible (account_tree, TRUE);
|
||||
|
||||
@@ -484,7 +484,7 @@ void gnc_imap_add_account_bayes(GncImportMatchMap *imap, GList *tokens, Account
|
||||
string, which doesn't work in the kvp loopkup later. So we
|
||||
skip this case here. */
|
||||
if (!current_token->data || (*((char*)current_token->data) == '\0'))
|
||||
continue;
|
||||
continue;
|
||||
|
||||
/* start off with no tokens for this account */
|
||||
token_count = 0;
|
||||
|
||||
@@ -581,6 +581,7 @@ void gnc_file_log_replay (void)
|
||||
}
|
||||
g_free(selected_filename);
|
||||
}
|
||||
LEAVE("");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -821,7 +821,6 @@ gnc_table_move_cursor_internal (Table *table,
|
||||
}
|
||||
|
||||
LEAVE("out of bounds\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1091,11 +1090,17 @@ gnc_table_enter_update (Table *table,
|
||||
/* OK, if there is a callback for this cell, call it */
|
||||
cell = gnc_cellblock_get_cell (cb, cell_row, cell_col);
|
||||
if (!cell)
|
||||
return FALSE;
|
||||
|
||||
{
|
||||
LEAVE("no cell");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
io_flags = gnc_table_get_io_flags (table, virt_loc);
|
||||
if (io_flags == XACC_CELL_ALLOW_READ_ONLY)
|
||||
return FALSE;
|
||||
{
|
||||
LEAVE("read only cell");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
enter = cell->enter_cell;
|
||||
|
||||
@@ -1127,7 +1132,6 @@ gnc_table_enter_update (Table *table,
|
||||
table->gui_handlers.redraw_help (table);
|
||||
|
||||
LEAVE("return %d\n", can_edit);
|
||||
|
||||
return can_edit;
|
||||
}
|
||||
|
||||
@@ -1156,7 +1160,10 @@ gnc_table_leave_update (Table *table, VirtualLocation virt_loc)
|
||||
/* OK, if there is a callback for this cell, call it */
|
||||
cell = gnc_cellblock_get_cell (cb, cell_row, cell_col);
|
||||
if (!cell)
|
||||
return;
|
||||
{
|
||||
LEAVE("no cell");
|
||||
return;
|
||||
}
|
||||
|
||||
leave = cell->leave_cell;
|
||||
|
||||
@@ -1180,6 +1187,7 @@ gnc_table_leave_update (Table *table, VirtualLocation virt_loc)
|
||||
|
||||
g_free (old_value);
|
||||
}
|
||||
LEAVE("");
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -1244,6 +1252,7 @@ gnc_table_modify_update (Table *table,
|
||||
if (cancelled)
|
||||
*cancelled = TRUE;
|
||||
|
||||
LEAVE("change cancelled");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1253,15 +1262,20 @@ gnc_table_modify_update (Table *table,
|
||||
/* OK, if there is a callback for this cell, call it */
|
||||
cell = gnc_cellblock_get_cell (cb, cell_row, cell_col);
|
||||
if (!cell)
|
||||
return NULL;
|
||||
{
|
||||
LEAVE("no cell");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mv = cell->modify_verify;
|
||||
|
||||
old_value = g_strdup (cell->value);
|
||||
|
||||
if (mv)
|
||||
{
|
||||
mv (cell, change, change_len, newval, newval_len,
|
||||
cursor_position, start_selection, end_selection);
|
||||
}
|
||||
else
|
||||
{
|
||||
gnc_basic_cell_set_value (cell, newval);
|
||||
@@ -1327,7 +1341,10 @@ gnc_table_direct_update (Table *table,
|
||||
ENTER ("\n");
|
||||
|
||||
if (cell->direct_update == NULL)
|
||||
{
|
||||
LEAVE("no direct update");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
old_value = g_strdup (cell->value);
|
||||
|
||||
@@ -1356,6 +1373,7 @@ gnc_table_direct_update (Table *table,
|
||||
if (table->gui_handlers.redraw_help)
|
||||
table->gui_handlers.redraw_help (table);
|
||||
|
||||
LEAVE("");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1704,6 +1722,7 @@ gnc_table_traverse_update(Table *table,
|
||||
PERR("destination (%d, %d) out of bounds (%d, %d)\n",
|
||||
dest_loc->vcell_loc.virt_row, dest_loc->vcell_loc.virt_col,
|
||||
table->num_virt_rows, table->num_virt_cols);
|
||||
LEAVE("");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1761,13 +1780,19 @@ gnc_table_traverse_update(Table *table,
|
||||
}
|
||||
|
||||
if (!gnc_table_virtual_loc_valid(table, *dest_loc, FALSE))
|
||||
return TRUE;
|
||||
{
|
||||
LEAVE("");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case GNC_TABLE_TRAVERSE_POINTER:
|
||||
if (!gnc_table_find_valid_cell_horiz(table, dest_loc, TRUE))
|
||||
return TRUE;
|
||||
{
|
||||
LEAVE("");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@@ -457,6 +457,7 @@ gnc_plugin_page_report_load_cb(gnc_html * html, URLType type,
|
||||
if (inst_report != SCM_BOOL_F) {
|
||||
gnc_plugin_page_report_add_edited_report(priv, inst_report);
|
||||
}
|
||||
LEAVE("");
|
||||
return;
|
||||
} else {
|
||||
LEAVE( " unknown URL type [%s] location [%s]", type, location );
|
||||
|
||||
Reference in New Issue
Block a user