rem: while ( liste_tmp ) { struct struct_exercice *exercice; struct struct_exercice *copie_exercice;  exercice = liste_tmp -> data; copie_exercice = calloc ( 1, sizeof ( struct struct_exercice ));  copie_exercice -> no_exercice = exercice -> no_exercice; copie_exercice -> nom_exercice = g_strdup ( exercice -> nom_exercice );  if ( exercice -> date_debut ) copie_exercice -> date_debut = g_date_new_dmy ( g_date_day ( exercice -> date_debut ), g_date_month ( exercice -> date_debut ), g_date_year ( exercice -> date_debut ));  if ( exercice -> date_fin ) copie_exercice -> date_fin = g_date_new_dmy ( g_date_day ( exercice -> date_fin ), g_date_month ( exercice -> date_fin ), g_date_year ( exercice -> date_fin ));  copie_exercice -> affiche_dans_formulaire = exercice -> affiche_dans_formulaire;  liste_struct_exercices_tmp = g_slist_append ( liste_struct_exercices_tmp, copie_exercice ); liste_tmp = liste_tmp -> next; }  no_derniere_exercice_tmp = no_derniere_exercice; nb_exercices_tmp = nb_exercices;     liste_tmp = liste_struct_exercices_tmp;
context: GtkWidget *onglet_exercices ( void ){  GtkWidget *hbox_pref, *vbox_pref, *label, *frame;  GtkWidget *scrolled_window, *vbox, *vbox2, *bouton, *hbox;  GtkWidget *paddingbox, *table;  GSList *liste_tmp;  gchar *titres[]={_("Name")};  vbox_pref = new_vbox_with_title_and_icon ( _("Financial years"),					     "financial-years.png" );  paddingbox = new_paddingbox_with_title ( vbox_pref, FALSE,					   _("Known financial years") );  hbox = gtk_hbox_new ( FALSE, 5 );  gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox,		       FALSE, FALSE, 0);  /* Create financial years list */  scrolled_window = gtk_scrolled_window_new ( NULL, NULL );  gtk_box_pack_start ( GTK_BOX ( hbox ), scrolled_window,		       TRUE, TRUE, 0);  gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),				   GTK_POLICY_NEVER,				   GTK_POLICY_AUTOMATIC);  gtk_widget_set_usize ( GTK_WIDGET ( scrolled_window ), FALSE, 120 );  clist_exercices_parametres = gtk_clist_new_with_titles ( 1, titres );  gtk_clist_set_column_auto_resize ( GTK_CLIST ( clist_exercices_parametres ),				      0, TRUE );  gtk_clist_column_titles_passive ( GTK_CLIST ( clist_exercices_parametres ));  gtk_signal_connect_object  ( GTK_OBJECT ( fenetre_preferences ),			       "apply",			       GTK_SIGNAL_FUNC ( gtk_clist_unselect_all ),			       GTK_OBJECT ( clist_exercices_parametres ));  gtk_container_add ( GTK_CONTAINER ( scrolled_window ),		      clist_exercices_parametres );  /* Do not activate unless an account is opened */  if ( !nb_comptes )    {      gtk_widget_set_sensitive ( vbox_pref, FALSE );    }  else    {      /* Work on a temporary list based on liste_struct_exercices */      liste_struct_exercices_tmp = NULL;      liste_tmp = liste_struct_exercices;      while ( liste_tmp )	{	  struct struct_exercice *exercice;	  struct struct_exercice *copie_exercice;	  exercice = liste_tmp -> data;	  copie_exercice = calloc ( 1,				    sizeof ( struct struct_exercice ));	  copie_exercice -> no_exercice = exercice -> no_exercice;	  copie_exercice -> nom_exercice = g_strdup ( exercice -> nom_exercice );	  if ( exercice -> date_debut )	    copie_exercice -> date_debut = g_date_new_dmy ( g_date_day ( exercice -> date_debut ),							    g_date_month ( exercice -> date_debut ),							    g_date_year ( exercice -> date_debut ));	  if ( exercice -> date_fin )	    copie_exercice -> date_fin = g_date_new_dmy ( g_date_day ( exercice -> date_fin ),							  g_date_month ( exercice -> date_fin ),							  g_date_year ( exercice -> date_fin ));	  copie_exercice -> affiche_dans_formulaire = exercice -> affiche_dans_formulaire;	  liste_struct_exercices_tmp = g_slist_append ( liste_struct_exercices_tmp,							copie_exercice );	  liste_tmp = liste_tmp -> next;	}      no_derniere_exercice_tmp = no_derniere_exercice;      nb_exercices_tmp = nb_exercices;      /* remplissage de la liste avec les exercices temporaires */      liste_tmp = liste_struct_exercices_tmp;      while ( liste_tmp )	{	  struct struct_exercice *exercice;	  gchar *ligne[1];	  gint ligne_insert;	  exercice = liste_tmp -> data;	  ligne[0] = exercice -> nom_exercice;	  ligne_insert = gtk_clist_append ( GTK_CLIST ( clist_exercices_parametres ),					    ligne );	  /* on associe  la ligne la struct de la exercice */	  gtk_clist_set_row_data ( GTK_CLIST ( clist_exercices_parametres ),				   ligne_insert,				   exercice );	  liste_tmp = liste_tmp -> next;	}    }  /* Order buttons in a vbox */  vbox = gtk_vbox_new ( FALSE, 5 );  gtk_box_pack_start ( GTK_BOX ( hbox ), vbox,		       FALSE, FALSE, 0 );  /* Add button */  bouton = gtk_button_new_from_stock (GTK_STOCK_ADD);  gtk_signal_connect ( GTK_OBJECT ( bouton ), "clicked",		       GTK_SIGNAL_FUNC  ( ajout_exercice ),		       clist_exercices_parametres );  gtk_box_pack_start ( GTK_BOX ( vbox ), bouton,		       FALSE, FALSE, 5 );  /* Remove button */  bouton_supprimer_exercice = gtk_button_new_from_stock (GTK_STOCK_REMOVE);  gtk_widget_set_sensitive ( bouton_supprimer_exercice, FALSE );  gtk_signal_connect ( GTK_OBJECT ( bouton_supprimer_exercice ), "clicked",		       GTK_SIGNAL_FUNC  ( supprime_exercice ),		       clist_exercices_parametres );  gtk_box_pack_start ( GTK_BOX ( vbox ), bouton_supprimer_exercice,		       FALSE, FALSE, 5 );  /* Associate operations */  bouton = gtk_button_new_with_label ( _("Associate operations without financial years") );  gtk_signal_connect ( GTK_OBJECT ( bouton ),		       "clicked",		       GTK_SIGNAL_FUNC ( association_automatique ),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox ), bouton,		       FALSE, FALSE, 5 );  gtk_widget_show ( bouton );  /* Handle clist selections */  gtk_signal_connect ( GTK_OBJECT ( clist_exercices_parametres ), "select-row",		       GTK_SIGNAL_FUNC ( selection_ligne_exercice ),		       frame );  gtk_signal_connect ( GTK_OBJECT ( clist_exercices_parametres ), "unselect-row",		       GTK_SIGNAL_FUNC ( deselection_ligne_exercice ),		       frame );  /* Financial year details */  paddingbox = new_paddingbox_with_title ( vbox_pref, FALSE,					   _("Financial year details") );  /* Put stuff in a table */  table = gtk_table_new ( 2, 2, FALSE );  gtk_table_set_row_spacings ( GTK_TABLE ( table ), 6 );  gtk_table_set_col_spacings ( GTK_TABLE ( table ), 6 );  gtk_box_pack_start ( GTK_BOX ( paddingbox ), table,		       FALSE, FALSE, 0 );  /* Financial year name */  label = gtk_label_new ( COLON(_("Name")) );  gtk_table_attach ( GTK_TABLE ( table ),		     label, 0, 1, 0, 1,		     GTK_SHRINK | GTK_FILL, 0,		     0, 0 );  nom_exercice = gtk_entry_new ();  gtk_table_attach ( GTK_TABLE ( table ),		     nom_exercice, 1, 2, 0, 1,		     GTK_EXPAND | GTK_FILL, 0,		     0, 0 );  /* Start */  label = gtk_label_new ( COLON(_("Start")) );  gtk_misc_set_alignment (GTK_MISC (label), 0, 1);  gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );  gtk_table_attach ( GTK_TABLE ( table ),		     label, 0, 1, 1, 2,		     GTK_SHRINK | GTK_FILL, 0,		     0, 0 );  debut_exercice = gtk_entry_new ();  gtk_table_attach ( GTK_TABLE ( table ),		     debut_exercice, 1, 2, 1, 2,		     GTK_EXPAND | GTK_FILL, 0,		     0, 0 );  /* End */  label = gtk_label_new ( COLON(_("End")) );  gtk_misc_set_alignment (GTK_MISC (label), 0, 1);  gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );  gtk_table_attach ( GTK_TABLE ( table ),		     label, 0, 1, 2, 3,		     GTK_SHRINK | GTK_FILL, 0,		     0, 0 );  fin_exercice = gtk_entry_new ();  gtk_table_attach ( GTK_TABLE ( table ),		     fin_exercice, 1, 2, 2, 3,		     GTK_EXPAND | GTK_FILL, 0,		     0, 0 );  /* Activate in transaction form? */  /* FIXME: make a new checkbox paradigm to allow refining (put data     in widget?) */  affichage_exercice = new_checkbox_with_title (_("Activate in transaction form"),						NULL);  gtk_box_pack_start ( GTK_BOX ( paddingbox ), affichage_exercice,		       FALSE, FALSE, 0 );  return ( vbox_pref );}