rem: dialog_recapitulatif = gtk_dialog_new_with_buttons ( _("Recap of the accounts to import :" ), GTK_WINDOW ( window ), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_ADD, 1, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL ); gtk_window_set_transient_for ( GTK_WINDOW ( dialog_recapitulatif ), GTK_WINDOW ( window ) ); gtk_window_set_policy ( GTK_WINDOW ( dialog_recapitulatif ), TRUE, TRUE, FALSE );  if ( nb_comptes ) gtk_widget_set_usize ( dialog_recapitulatif, 900, 400 ); else gtk_widget_set_usize ( dialog_recapitulatif, 650, 400 );   label = gtk_label_new ( _("List of the selection of accounts :")); gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog_recapitulatif ) -> vbox ), label, FALSE, FALSE, 0 ); gtk_widget_show ( label );  scrolled_window = gtk_scrolled_window_new ( FALSE, FALSE ); gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog_recapitulatif ) -> vbox ), scrolled_window, TRUE, TRUE, 0 ); gtk_widget_show ( scrolled_window );   table_recapitulatif = gtk_table_new ( g_slist_length ( liste_comptes_importes ), 7, FALSE ); gtk_scrolled_window_add_with_viewport ( GTK_SCROLLED_WINDOW ( scrolled_window ), table_recapitulatif ); gtk_container_set_border_width ( GTK_CONTAINER ( table_recapitulatif ), 10 ); gtk_widget_show ( table_recapitulatif );    label = gtk_label_new ( _( "Date" )); gtk_table_attach ( GTK_TABLE ( table_recapitulatif ), label, 0, 1, 0 ,1, GTK_SHRINK, GTK_SHRINK, 0, 0 ); gtk_widget_show ( label );  label = gtk_label_new ( _( "Name" )); gtk_table_attach ( GTK_TABLE ( table_recapitulatif ), label, 1, 2, 0 ,1, GTK_SHRINK, GTK_SHRINK, 0, 0 ); gtk_widget_show ( label );  label = gtk_label_new ( _( "Devise" )); gtk_table_attach ( GTK_TABLE ( table_recapitulatif ), label, 2, 3, 0 ,1, GTK_SHRINK, GTK_SHRINK, 0, 0 ); gtk_widget_show ( label );  label = gtk_label_new ( _( "Action" )); gtk_table_attach ( GTK_TABLE ( table_recapitulatif ), label, 3, 4, 0 ,1, GTK_SHRINK, GTK_SHRINK, 0, 0 ); gtk_widget_show ( label );  if ( nb_comptes )
add: dialog_recapitulatif = gtk_dialog_new_with_buttons ( _("Recap of the accounts to import :" ), GTK_WINDOW ( window ), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_ADD, 1, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL ); gtk_window_set_transient_for ( GTK_WINDOW ( dialog_recapitulatif ), GTK_WINDOW ( window ) ); gtk_window_set_policy ( GTK_WINDOW ( dialog_recapitulatif ), TRUE, TRUE, FALSE );  if ( nb_comptes ) gtk_widget_set_usize ( dialog_recapitulatif, 900, 400 ); else gtk_widget_set_usize ( dialog_recapitulatif, 650, 400 );   label = gtk_label_new ( _("List of the selection of accounts :")); gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog_recapitulatif ) -> vbox ), label, FALSE, FALSE, 0 ); gtk_widget_show ( label );  scrolled_window = gtk_scrolled_window_new ( FALSE, FALSE ); gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog_recapitulatif ) -> vbox ), scrolled_window, TRUE, TRUE, 0 ); gtk_widget_show ( scrolled_window );   table_recapitulatif = gtk_table_new ( g_slist_length ( liste_comptes_importes ), 7, FALSE ); gtk_scrolled_window_add_with_viewport ( GTK_SCROLLED_WINDOW ( scrolled_window ), table_recapitulatif ); gtk_container_set_border_width ( GTK_CONTAINER ( table_recapitulatif ), 10 ); gtk_widget_show ( table_recapitulatif );    label = gtk_label_new ( _( "Date" )); gtk_table_attach ( GTK_TABLE ( table_recapitulatif ), label, 0, 1, 0 ,1, GTK_SHRINK, GTK_SHRINK, 0, 0 ); gtk_widget_show ( label );  label = gtk_label_new ( _( "Name" )); gtk_table_attach ( GTK_TABLE ( table_recapitulatif ), label, 1, 2, 0 ,1, GTK_SHRINK, GTK_SHRINK, 0, 0 ); gtk_widget_show ( label );  label = gtk_label_new ( _( "Currency" )); gtk_table_attach ( GTK_TABLE ( table_recapitulatif ), label, 2, 3, 0 ,1, GTK_SHRINK, GTK_SHRINK, 0, 0 ); gtk_widget_show ( label );  label = gtk_label_new ( _( "Action" )); gtk_table_attach ( GTK_TABLE ( table_recapitulatif ), label, 3, 4, 0 ,1, GTK_SHRINK, GTK_SHRINK, 0, 0 ); gtk_widget_show ( label );  if ( nb_comptes )
context: gboolean affichage_recapitulatif_importation ( void ){  /* on affiche un tableau rcapitulatif des comptes imports */  /* propose l'action  faire pour chaque compte et propose */  /* d'en importer d'autres */  gint retour;  GtkWidget *label;  GSList *liste_tmp;  GtkWidget *scrolled_window;  GtkWidget *bouton;  GtkWidget *hbox;  if ( !liste_comptes_importes )    return (FALSE);  if ( dialog_recapitulatif )    {      /*  la boite a dj t cr, on ajoute les nouveaux comptes  la suite */      /* on vrifie dj s'il y a plus d'lments dans la liste que de lignes sur le tableau */      if ( g_slist_length ( liste_comptes_importes ) > ( GTK_TABLE ( table_recapitulatif ) -> nrows - 1 ))	{	  /* on dmarre au nouveaux comptes */	  liste_tmp = g_slist_nth ( liste_comptes_importes,				    GTK_TABLE ( table_recapitulatif ) -> nrows - 1 );	  while ( liste_tmp )	    {	      cree_ligne_recapitulatif ( liste_tmp -> data,					 g_slist_position ( liste_comptes_importes,							    liste_tmp ) + 1);	      liste_tmp = liste_tmp -> next;	    }	}      gtk_widget_show ( dialog_recapitulatif );    }  else    {      /* la boite n'a pas encore t cr, on le fait */      dialog_recapitulatif = gtk_dialog_new_with_buttons ( _("Recap of the accounts to import :" ),		      						GTK_WINDOW ( window ),								GTK_DIALOG_MODAL,								GTK_STOCK_OK,								GTK_RESPONSE_OK,								GTK_STOCK_ADD,								1,								GTK_STOCK_CANCEL,								GTK_RESPONSE_CANCEL,								NULL );      gtk_window_set_transient_for ( GTK_WINDOW ( dialog_recapitulatif ),				     GTK_WINDOW ( window ) );      gtk_window_set_policy ( GTK_WINDOW ( dialog_recapitulatif ),			      TRUE,			      TRUE,			      FALSE );      if ( nb_comptes )	gtk_widget_set_usize ( dialog_recapitulatif,			       900,			       400 );      else	gtk_widget_set_usize ( dialog_recapitulatif,			       650,			       400 );      label = gtk_label_new ( _("List of the selection of accounts :"));      gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog_recapitulatif ) -> vbox ),			   label,			   FALSE,			   FALSE,			   0 );      gtk_widget_show ( label );      scrolled_window = gtk_scrolled_window_new ( FALSE,						  FALSE );      gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),				       GTK_POLICY_AUTOMATIC,				       GTK_POLICY_AUTOMATIC );      gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog_recapitulatif ) -> vbox ),			   scrolled_window,			   TRUE,			   TRUE,			   0 );      gtk_widget_show ( scrolled_window );      table_recapitulatif = gtk_table_new ( g_slist_length ( liste_comptes_importes ),					    7,					    FALSE );      gtk_scrolled_window_add_with_viewport ( GTK_SCROLLED_WINDOW ( scrolled_window ),					      table_recapitulatif );      gtk_container_set_border_width ( GTK_CONTAINER ( table_recapitulatif ),				       10 );      gtk_widget_show ( table_recapitulatif );      /* on met les titres des colonnes */      label = gtk_label_new ( _( "Date" ));      gtk_table_attach ( GTK_TABLE ( table_recapitulatif ),			 label,			 0, 1,			 0 ,1,			 GTK_SHRINK,			 GTK_SHRINK,			 0, 0 );      gtk_widget_show ( label );      label = gtk_label_new ( _( "Name" ));      gtk_table_attach ( GTK_TABLE ( table_recapitulatif ),			 label,			 1, 2,			 0 ,1,			 GTK_SHRINK,			 GTK_SHRINK,			 0, 0 );      gtk_widget_show ( label );      label = gtk_label_new ( _( "Devise" ));      gtk_table_attach ( GTK_TABLE ( table_recapitulatif ),			 label,			 2, 3,			 0 ,1,			 GTK_SHRINK,			 GTK_SHRINK,			 0, 0 );      gtk_widget_show ( label );      label = gtk_label_new ( _( "Action" ));      gtk_table_attach ( GTK_TABLE ( table_recapitulatif ),			 label,			 3, 4,			 0 ,1,			 GTK_SHRINK,			 GTK_SHRINK,			 0, 0 );      gtk_widget_show ( label );      if ( nb_comptes )	{	  label = gtk_label_new ( _( "Account" ));	  gtk_table_attach ( GTK_TABLE ( table_recapitulatif ),			     label,			     4, 5,			     0 ,1,			     GTK_SHRINK,			     GTK_SHRINK,			     0, 0 );	  gtk_widget_show ( label );	}      label = gtk_label_new ( _( "Type of account" ));      gtk_table_attach ( GTK_TABLE ( table_recapitulatif ),			 label,			 5, 6,			 0 ,1,			 GTK_SHRINK,			 GTK_SHRINK,			 0, 0 );      gtk_widget_show ( label );      label = gtk_label_new ( _( "Origine" ));      gtk_table_attach ( GTK_TABLE ( table_recapitulatif ),			 label,			 6, 7,			 0 ,1,			 GTK_SHRINK,			 GTK_SHRINK,			 0, 0 );      gtk_widget_show ( label );      /* si aucun compte n'est ouvert, on cre les devises de base */      if ( !nb_comptes )	creation_devises_de_base ();      liste_tmp = liste_comptes_importes;      while ( liste_tmp )	{	  cree_ligne_recapitulatif ( liste_tmp -> data,				     g_slist_position ( liste_comptes_importes,							liste_tmp ) + 1);	  liste_tmp = liste_tmp -> next;	}      /* on rajoute ensuite le bouton pour ajouter des devises */      hbox = gtk_hbox_new ( FALSE,			    0 );      gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog_recapitulatif ) -> vbox ),			   hbox,			   FALSE,			   FALSE,			   0 );      gtk_widget_show ( hbox );      bouton = gtk_button_new_with_label ( _("Add a devise") );      gtk_button_set_relief ( GTK_BUTTON ( bouton ),			      GTK_RELIEF_NONE );      gtk_signal_connect ( GTK_OBJECT ( bouton ),			   "clicked",			   GTK_SIGNAL_FUNC ( ajout_devise ),			   NULL );      gtk_box_pack_start ( GTK_BOX ( hbox ),			   bouton,			   TRUE,			   FALSE,			   0 );      gtk_widget_show ( bouton );    }  retour = gtk_dialog_run ( GTK_DIALOG ( dialog_recapitulatif ));  switch ( retour )    {    case GTK_RESPONSE_OK:      /*  on a appuy sur ok, il ne reste plus qu' traiter les infos */      traitement_operations_importees ();	gtk_widget_destroy ( dialog_recapitulatif );      break;    case 1:      /*  on a appuy sur ajouter, on raffiche la boite de slection de fichier */      gtk_widget_hide ( dialog_recapitulatif );      selection_fichiers_import ();      break;    default:      /* on annule */	gtk_widget_destroy ( dialog_recapitulatif );     }  return ( FALSE );}