rem: if ( DEBUG ) printf ( "gsb_file_others_load %s\n", filename );
add: devel_debug ( g_strdup_printf ( "gsb_file_others_load %s", filename ));
context: gboolean gsb_file_others_load ( gchar *filename,				gint origin ){    gchar *file_content;    GSList *import_list = NULL;    if ( DEBUG )	printf ( "gsb_file_others_load %s\n", 		 filename );    /* general check */        if ( !g_file_test ( filename,			G_FILE_TEST_EXISTS ))    {	dialogue_error (g_strdup_printf (_("Cannot open file '%s': %s"),					 filename,					 latin2utf8 (strerror(errno))));	remove_file_from_last_opened_files_list (filename);	return FALSE;    }    /* check here if it's not a regular file */    if ( !g_file_test ( filename,			G_FILE_TEST_IS_REGULAR ))    {	dialogue_error ( g_strdup_printf ( _("%s doesn't seem to be a regular file,\nplease check it and try again."),					   filename ));	remove_file_from_last_opened_files_list (filename);	return ( FALSE );    }    /* load the file */    if ( g_file_get_contents ( filename,			       &file_content,			       NULL,			       NULL ))    {	GMarkupParser *markup_parser = g_malloc0 (sizeof (GMarkupParser));	GMarkupParseContext *context;	/* check if it's a good file */	if ( !gsb_file_others_check_file ( file_content,					   origin ))	{	    free (file_content);	    return FALSE;	}	/* for now, we load only after 0.6 files */	/* fill the GMarkupParser for a new xml structure */	markup_parser -> start_element = (void *) gsb_file_others_start_element;	markup_parser -> error = (void *) gsb_file_load_error;	context = g_markup_parse_context_new ( markup_parser,					       0,					       &import_list,					       NULL );	g_markup_parse_context_parse ( context,				       file_content,				       strlen (file_content),				       NULL );	/* now, import_list contains the list of categories/budget or report */	switch ( origin )	{	    gint report_number;	    case 0:		/* comes for category */		gsb_data_category_merge_category_list ( import_list );		remplit_arbre_categ ();		break;	    case 1:		/* comes for budget */		gsb_data_budget_merge_budget_list ( import_list );		remplit_arbre_imputation ();		break;	    case 2:		/* comes for report,		 * as we cannot have the same things between differents grisbi files,		 * we cannot export/import currencies, financial years, accounts names,		 * categories, budgetaries and parties		 * so we erase them here because perhaps they doesn't exist and show		 * a warning : the user has to do it by himself (untill a druid to help him ?) *//* 		report = import_list -> data; *//* 		if (report) *//* 		{ */		report_number = gsb_data_report_new ( _("Imported report"));		    /* set the currencies */		    gsb_data_report_set_currency_general ( report_number,							   1 );		    gsb_data_report_set_category_currency ( report_number,							    1 );		    gsb_data_report_set_budget_currency ( report_number,							  1 );		    gsb_data_report_set_payee_currency ( report_number,							 1 );		    gsb_data_report_set_amount_comparison_currency ( report_number,								     1 );		    /* erase the financials years */		    gsb_data_report_set_financial_year_list ( report_number,							      NULL );		    /* erase the accounts */		    gsb_data_report_set_account_numbers ( report_number,							  NULL);		    /* erase the transferts accounts */		    gsb_data_report_set_transfer_account_numbers ( report_number,								   NULL );		    /* erase the categories */		    gsb_data_report_set_category_numbers ( report_number,							   NULL );		    /* erase the budget */		    gsb_data_report_set_budget_numbers ( report_number,							 NULL );		    /* erase the parties */		    gsb_data_report_set_payee_numbers ( report_number,							NULL );		    /* erase the kinds of payment */		    gsb_data_report_set_method_of_payment_list ( report_number,								 NULL );		    /* append it to the list *//* 		    liste_struct_etats = g_slist_append ( liste_struct_etats,  *//* 							  report ); *//* 		    gsb_gui_navigation_add_report ( report ); */		    /* inform the user of that */		    dialogue_hint ( _("Some things in a report cannot be imported :\nThe selected lists of financial years, accounts, transfer accounts, categories, budgetaries, parties and kind of payments.\nSo that lists have been erased while the import.\nThe currencies have been set too on the first currency of this grisbi file.\nYou should check and modify that in the property box of that account."),				    _("Importing a report"));/* 		} */		break;	}	g_markup_parse_context_free (context);	g_free (markup_parser);	g_free (file_content);    }    else    {	dialogue_error (g_strdup_printf (_("Cannot open file '%s': %s"),					 filename,					 latin2utf8 (strerror(errno))));	remove_file_from_last_opened_files_list (filename);	return FALSE;    }    return TRUE;}