rem: g_key_file_set_string ( config, "IO", "Name last file", nom_fichier_comptes );
add: if ( nom_fichier_comptes ) { g_key_file_set_string ( config, "IO", "Name last file", nom_fichier_comptes ); }
context: gboolean gsb_file_config_save_config ( void ){    GKeyFile *config;    gchar *filename;    gchar *file_content;    gsize length;    FILE *conf_file;    gint i;        if ( DEBUG )	printf ( "gsb_file_config_save_config\n" );    filename = g_strconcat ( my_get_grisbirc_dir(), C_GRISBIRC, NULL );    config = g_key_file_new ();        /* get the geometry */    if ( GTK_WIDGET ( window) -> window ) 	gtk_window_get_size (GTK_WINDOW ( window ),			     &largeur_window,&hauteur_window);    else     {	largeur_window = 0;	hauteur_window = 0;    }    g_key_file_set_integer ( config,			     "Geometry",			     "Width",			     largeur_window );    g_key_file_set_integer ( config,			     "Geometry",			     "Height",			     hauteur_window );    /* save general */    g_key_file_set_integer ( config,			     "General",			     "Can modify R",			     etat.r_modifiable );    g_key_file_set_string ( config,			    "General",			    "Path",			    dernier_chemin_de_travail );    g_key_file_set_integer ( config,			     "General",			     "Show permission alert",			     etat.alerte_permission );    g_key_file_set_integer ( config,			     "General",			     "Function of entry",			     etat.entree );    g_key_file_set_integer ( config,			     "General",			     "Show alert messages",			     etat.alerte_mini );    g_key_file_set_integer ( config,			     "General",			     "Use user font",			     etat.utilise_fonte_listes );    if ( pango_desc_fonte_liste )	g_key_file_set_string ( config,				"General",				"Font name",				pango_font_description_to_string (pango_desc_fonte_liste));    g_key_file_set_string ( config,			    "General",			    "Waiting animation",			    etat.fichier_animation_attente );    g_key_file_set_string ( config,			    "General",			    "Latex command",			    etat.latex_command );    g_key_file_set_string ( config,			    "General",			    "Dvips command",			    etat.dvips_command );    g_key_file_set_string ( config,			    "General",			    "Web",			    my_strdelimit ( etat.browser_command,					    "&",					    "\\e" ));    /* Remember size of main panel */    if ( main_hpaned && GTK_IS_PANED ( main_hpaned ) )    {	etat.largeur_colonne_comptes_operation = gtk_paned_get_position ( GTK_PANED ( main_hpaned ) );    }    g_key_file_set_integer ( config,			     "General",			     "Panel width",			     etat.largeur_colonne_comptes_operation );    /* save input/output */    g_key_file_set_integer ( config,			     "IO",			     "Load last file",			     etat.dernier_fichier_auto );    g_key_file_set_string ( config,			    "IO",			    "Name last file",			    nom_fichier_comptes );    g_key_file_set_integer ( config,			     "IO",			     "Save at closing",			     etat.sauvegarde_auto );    g_key_file_set_integer ( config,			     "IO",			     "Save at opening",			     etat.sauvegarde_demarrage );    g_key_file_set_integer ( config,			     "IO",			     "Nb last opened files",			     nb_max_derniers_fichiers_ouverts );    g_key_file_set_integer ( config,			     "IO",			     "Compress file",			     etat.compress_file );    g_key_file_set_integer ( config,			     "IO",			     "Compress backup",			     etat.compress_backup );    g_key_file_set_integer ( config,			     "IO",			     "Force saving",			     etat.force_enregistrement );    g_key_file_set_string_list ( config,				 "IO",				 "Names last files",				 (const gchar **) tab_noms_derniers_fichiers_ouverts,				 nb_derniers_fichiers_ouverts );    /* save scheduled section */    g_key_file_set_integer ( config,			     "Scheduled",			     "Days before remind",			     nb_days_before_scheduled );    /* save shown section */    g_key_file_set_integer ( config,			     "Shown",			     "Show transaction form",			     etat.formulaire_toujours_affiche );    g_key_file_set_integer ( config,			     "Shown",			     "Show sheduled form",			     etat.formulaire_echeancier_toujours_affiche );    g_key_file_set_integer ( config,			     "Shown",			     "Order by date",			     etat.classement_par_date );    g_key_file_set_integer ( config,			     "Shown",			     "Show valid_cancel buttons",			     etat.affiche_boutons_valider_annuler );    g_key_file_set_integer ( config,			     "Shown",			     "Show grid",			     etat.affichage_grille );    g_key_file_set_integer ( config,			     "Shown",			     "Show automatic financial year",			     etat.affichage_exercice_automatique );    g_key_file_set_integer ( config,			     "Shown",			     "Limit payee completion",			     etat.limit_completion_to_current_account );    g_key_file_set_integer ( config,			     "Shown",			     "Show toolbar",			     etat.display_toolbar );    g_key_file_set_integer ( config,			     "Shown",			     "Show closed accounts",			     etat.show_closed_accounts );    /* FIXME : keep that external for now... to see */    save_config_format(config);    /* save messages */    for ( i = 0; messages[i].name; i ++ )    {	gchar * name = g_strconcat ( messages[i].name , " (answer)", NULL );	g_key_file_set_integer ( config, "Messages", messages[i].name, messages[i].hidden );	g_key_file_set_integer ( config, "Messages", name, messages[i].default_answer );	g_free ( name );    }    g_key_file_set_integer ( config,			     "Messages",			     "Last tip",			     etat.last_tip );    g_key_file_set_integer ( config,			     "Messages",			     "Show tip",			     etat.show_tip );    /* save printer config */    g_key_file_set_integer ( config,			     "Print config",			     "Printer",			     etat.print_config.printer );    g_key_file_set_string ( config,			    "Print config",			    "Printer name",			    etat.print_config.printer_name );    g_key_file_set_string ( config,			    "Print config",			    "Printer filename",			    etat.print_config.printer_filename );    g_key_file_set_integer ( config,			     "Print config",			     "Filetype",			     etat.print_config.filetype );    g_key_file_set_integer ( config,			     "Print config",			     "Orientation",			     etat.print_config.orientation );    /* save the paper config */    g_key_file_set_string ( config,			    "Paper config",			    "Name",			    etat.print_config.paper_config.name );    g_key_file_set_integer ( config,			     "Paper config",			     "Width",			     etat.print_config.paper_config.width );    g_key_file_set_integer ( config,			     "Paper config",			     "Height",			     etat.print_config.paper_config.height );    /* save into a file */    file_content = g_key_file_to_data ( config,					&length,					NULL );    conf_file = fopen ( filename,			  "w" );    if ( !conf_file	 ||	 !fwrite ( file_content,		   sizeof (gchar),		   length,		   conf_file ))    {	dialogue_error ( g_strdup_printf ( _("Cannot save configuration file '%s': %s"),					   filename,					   latin2utf8(strerror(errno)) ));	g_free ( file_content);	g_free (filename);	g_key_file_free (config);	return ( FALSE );    }        fclose (conf_file);    g_free ( file_content);    g_free (filename);    g_key_file_free (config);    return TRUE;}