static void
compare_single_job( QofInstance* inst, gpointer user_data )
{
    CompareInfoStruct* info = (CompareInfoStruct*)user_data;
    GncJob* job_1 = GNC_JOB(inst);
    GncJob* job_2 = gncJobLookup( info->book_2, qof_instance_get_guid(inst) );

    if (!gncJobEqual( job_1, job_2 ))
    {
        info->result = FALSE;
    }
}
Beispiel #2
0
static void
write_single_job( QofInstance *term_p, gpointer data_p )
{
    write_objects_t* s = (write_objects_t*)data_p;

    g_return_if_fail( term_p != NULL );
    g_return_if_fail( GNC_IS_JOB(term_p) );
    g_return_if_fail( data_p != NULL );

    if ( s->is_ok && job_should_be_saved( GNC_JOB(term_p) ) )
    {
        s->is_ok = save_job( s->be, term_p );
    }
}
Beispiel #3
0
static void
gnc_job_get_property (GObject         *object,
                      guint            prop_id,
                      GValue          *value,
                      GParamSpec      *pspec)
{
    GncJob *job;

    g_return_if_fail(GNC_IS_JOB(object));

    job = GNC_JOB(object);
    switch (prop_id)
    {
    case PROP_NAME:
        g_value_set_string(value, job->name);
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}