rem: event_box = gtk_event_box_new (); gtk_signal_connect ( GTK_OBJECT ( event_box ), "enter_notify_event", GTK_SIGNAL_FUNC ( met_en_prelight ), NULL ); gtk_signal_connect ( GTK_OBJECT ( event_box ), "leave_notify_event", GTK_SIGNAL_FUNC ( met_en_normal ), NULL ); gtk_signal_connect_object ( GTK_OBJECT ( event_box ), "button_press_event", GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ), (GtkObject *) operation ); gtk_table_attach ( GTK_TABLE ( table_etat ), event_box, colonne, colonne + 1, ligne, ligne + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0 ); gtk_widget_show ( event_box );
context: gint gtktable_affichage_ligne_ope ( struct structure_operation *operation,				    gint ligne ){  gint colonne;  GtkWidget *label;  GtkWidget *event_box;  /* on met tous les labels dans un event_box pour aller directement sur l'op si elle est clicke */  if ( etat_courant -> afficher_opes )    {      /* on affiche ce qui est demand pour les ops */      /* si les titres ne sont pas affichs et qu'il faut le faire, c'est ici */      if ( !titres_affiches	   &&	   etat_courant -> afficher_titre_colonnes	   &&	   etat_courant -> type_affichage_titres )	ligne = gtktable_affichage . affiche_titres_colonnes ( ligne );      colonne = 1;      if ( etat_courant -> afficher_no_ope )	{	  event_box = gtk_event_box_new ();	  gtk_signal_connect ( GTK_OBJECT ( event_box ),			       "enter_notify_event",			       GTK_SIGNAL_FUNC ( met_en_prelight ),			       NULL );	  gtk_signal_connect ( GTK_OBJECT ( event_box ),			       "leave_notify_event",			       GTK_SIGNAL_FUNC ( met_en_normal ),			       NULL );	  gtk_signal_connect_object ( GTK_OBJECT ( event_box ),				      "button_press_event",				      GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),				      (GtkObject *) operation );	  gtk_table_attach ( GTK_TABLE ( table_etat ),			     event_box,			     colonne, colonne + 1,			     ligne, ligne + 1,			     GTK_SHRINK | GTK_FILL,			     GTK_SHRINK | GTK_FILL,			     0, 0 );	  gtk_widget_show ( event_box );	  label = gtk_label_new ( itoa ( operation -> no_operation ));	  gtk_misc_set_alignment ( GTK_MISC ( label ),				   0,				   0.5 );	  gtk_widget_set_style ( label,				 style_label_nom_compte );	  gtk_container_add ( GTK_CONTAINER ( event_box ),			      label );	  gtk_widget_show ( label );	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_date_ope )	{	  event_box = gtk_event_box_new ();	  gtk_signal_connect ( GTK_OBJECT ( event_box ),			       "enter_notify_event",			       GTK_SIGNAL_FUNC ( met_en_prelight ),			       NULL );	  gtk_signal_connect ( GTK_OBJECT ( event_box ),			       "leave_notify_event",			       GTK_SIGNAL_FUNC ( met_en_normal ),			       NULL );	  gtk_signal_connect_object ( GTK_OBJECT ( event_box ),				      "button_press_event",				      GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),				      (GtkObject *) operation );	  gtk_table_attach ( GTK_TABLE ( table_etat ),			     event_box,			     colonne, colonne + 1,			     ligne, ligne + 1,			     GTK_SHRINK | GTK_FILL,			     GTK_SHRINK | GTK_FILL,			     0, 0 );	  gtk_widget_show ( event_box );	  label = gtk_label_new ( g_strdup_printf  ( "%.2d/%.2d/%d",						     operation -> jour,						     operation -> mois,						     operation -> annee ));	  gtk_misc_set_alignment ( GTK_MISC ( label ),				   0,				   0.5 );	  gtk_widget_set_style ( label,				 style_label_nom_compte );	  gtk_container_add ( GTK_CONTAINER ( event_box ),			      label );	  gtk_widget_show ( label );	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_exo_ope )	{	  if ( operation -> no_exercice )	    {	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( ((struct struct_exercice *)(g_slist_find_custom ( liste_struct_exercices,											GINT_TO_POINTER ( operation -> no_exercice ),											(GCompareFunc) recherche_exercice_par_no )->data)) -> nom_exercice );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_tiers_ope )	{	  if ( operation -> tiers )	    {	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( ((struct struct_tiers *)(g_slist_find_custom ( liste_struct_tiers,										     GINT_TO_POINTER ( operation -> tiers ),										     (GCompareFunc) recherche_tiers_par_no )->data)) -> nom_tiers );		      	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_categ_ope )	{	  gchar *pointeur;	  pointeur = NULL;	  if ( operation -> categorie )	    {	      struct struct_categ *categ;	      categ = g_slist_find_custom ( liste_struct_categories,					    GINT_TO_POINTER ( operation -> categorie ),					    (GCompareFunc) recherche_categorie_par_no ) -> data;	      pointeur = categ -> nom_categ;	      if ( operation -> sous_categorie		   &&		   etat_courant -> afficher_sous_categ_ope )		pointeur = g_strconcat ( pointeur,					 " : ",					 ((struct struct_sous_categ *)(g_slist_find_custom ( categ -> liste_sous_categ,											     GINT_TO_POINTER ( operation -> sous_categorie ),											     (GCompareFunc) recherche_sous_categorie_par_no ) -> data )) -> nom_sous_categ,					 NULL );	    }	  else	    {	      /* si c'est un virement, on le marque, sinon c'est qu'il n'y a pas de categ */	      /* ou que c'est une op ventile, et on marque rien */	      if ( operation -> relation_no_operation )		{		  /* c'est un virement */		  p_tab_nom_de_compte_variable = p_tab_nom_de_compte + operation -> relation_no_compte;		  if ( operation -> montant < 0 )		    pointeur = g_strconcat ( _("Virement vers "),					     NOM_DU_COMPTE,					     NULL );		  else		    pointeur = g_strconcat ( _("Virement de "),					     NOM_DU_COMPTE,					     NULL );		}	    }	  if ( pointeur )	    {	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( pointeur );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}		      if ( etat_courant -> afficher_ib_ope )	{	  if ( operation -> imputation )	    {	      struct struct_imputation *ib;	      gchar *pointeur;	      ib = g_slist_find_custom ( liste_struct_imputation,					 GINT_TO_POINTER ( operation -> imputation ),					 (GCompareFunc) recherche_imputation_par_no ) -> data;	      pointeur = ib -> nom_imputation;	      if ( operation -> sous_imputation		   &&		   etat_courant -> afficher_sous_ib_ope )		pointeur = g_strconcat ( pointeur,					 " : ",					 ((struct struct_sous_imputation *)(g_slist_find_custom ( ib -> liste_sous_imputation,												  GINT_TO_POINTER ( operation -> sous_imputation ),												  (GCompareFunc) recherche_sous_imputation_par_no ) -> data )) -> nom_sous_imputation,					 NULL );	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( pointeur );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_notes_ope )	{	  if ( operation -> notes )	    {	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( operation -> notes );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_type_ope )	{	  GSList *pointeur;	  p_tab_nom_de_compte_variable = p_tab_nom_de_compte + operation -> no_compte;	  pointeur = g_slist_find_custom ( TYPES_OPES,					   GINT_TO_POINTER ( operation -> type_ope ),					   (GCompareFunc) recherche_type_ope_par_no );	  if ( pointeur )	    {	      struct struct_type_ope *type;	      type = pointeur -> data;	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( type -> nom_type );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_cheque_ope )	{	  if ( operation -> contenu_type )	    {	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( operation -> contenu_type );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_pc_ope )	{	  if ( operation -> no_piece_comptable )	    {	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( operation -> no_piece_comptable );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_infobd_ope )	{	  if ( operation -> info_banque_guichet )	    {	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( operation -> info_banque_guichet );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      if ( etat_courant -> afficher_rappr_ope )	{	  GSList *pointeur;	  pointeur = g_slist_find_custom ( liste_no_rapprochements,					   GINT_TO_POINTER ( operation -> no_rapprochement ),					   (GCompareFunc) recherche_no_rapprochement_par_no );	  if ( pointeur )	    {	      struct struct_no_rapprochement *rapprochement;	      rapprochement = pointeur -> data;	      event_box = gtk_event_box_new ();	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "enter_notify_event",				   GTK_SIGNAL_FUNC ( met_en_prelight ),				   NULL );	      gtk_signal_connect ( GTK_OBJECT ( event_box ),				   "leave_notify_event",				   GTK_SIGNAL_FUNC ( met_en_normal ),				   NULL );	      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),					  "button_press_event",					  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),					  (GtkObject *) operation );	      gtk_table_attach ( GTK_TABLE ( table_etat ),				 event_box,				 colonne, colonne + 1,				 ligne, ligne + 1,				 GTK_SHRINK | GTK_FILL,				 GTK_SHRINK | GTK_FILL,				 0, 0 );	      gtk_widget_show ( event_box );	      label = gtk_label_new ( rapprochement -> nom_rapprochement );	      gtk_misc_set_alignment ( GTK_MISC ( label ),				       0,				       0.5 );	      gtk_widget_set_style ( label,				     style_label_nom_compte );	      gtk_container_add ( GTK_CONTAINER ( event_box ),				  label );	      gtk_widget_show ( label );	    }	  colonne = colonne + 2;	}      /* on affiche le montant au bout de la ligne */      event_box = gtk_event_box_new ();      gtk_signal_connect ( GTK_OBJECT ( event_box ),			   "enter_notify_event",			   GTK_SIGNAL_FUNC ( met_en_prelight ),			   NULL );      gtk_signal_connect ( GTK_OBJECT ( event_box ),			   "leave_notify_event",			   GTK_SIGNAL_FUNC ( met_en_normal ),			   NULL );      gtk_signal_connect_object ( GTK_OBJECT ( event_box ),				  "button_press_event",				  GTK_SIGNAL_FUNC ( gtktable_click_sur_ope_etat ),				  (GtkObject *) operation );      gtk_table_attach ( GTK_TABLE ( table_etat ),			 event_box,			 GTK_TABLE ( table_etat ) -> ncols - 1, GTK_TABLE ( table_etat ) -> ncols,			 ligne, ligne + 1,			 GTK_SHRINK | GTK_FILL,			 GTK_SHRINK | GTK_FILL,			 0, 0 );      gtk_widget_show ( event_box );      if ( devise_compte_en_cours_etat	   &&	   operation -> devise == devise_compte_en_cours_etat -> no_devise )	label = gtk_label_new ( g_strdup_printf  ("%4.2f %s",						  operation -> montant,						  devise_compte_en_cours_etat -> code_devise ));      else	{	  struct struct_devise *devise_operation;	  devise_operation = g_slist_find_custom ( liste_struct_devises,						   GINT_TO_POINTER ( operation -> devise ),						   ( GCompareFunc ) recherche_devise_par_no ) -> data;	  label = gtk_label_new ( g_strdup_printf  ("%4.2f %s",						    operation -> montant,						    devise_operation -> code_devise ));	}      gtk_misc_set_alignment ( GTK_MISC ( label ),			       1,			       0.5 );      gtk_widget_set_style ( label,			     style_label_nom_compte );      gtk_container_add ( GTK_CONTAINER ( event_box ),			  label );      gtk_widget_show ( label );      if ( ligne_debut_partie == -1 )	ligne_debut_partie = ligne;      ligne++;    }  return ( ligne );}