rem: "button_press_event");
add: "button-press-event");
context: void clique_champ_formulaire ( GtkWidget *entree,			       GdkEventButton *ev,			       gint *no_origine ){  /* on rend sensitif tout ce qui ne l'tait pas sur le formulaire */  degrise_formulaire_operations ();  /* si l'entre de la date est grise, on met la date courante */  /* seulement si la date relle est grise aussi. Dans le cas contraire, c'est elle qui prend le focus */  if ( (gtk_widget_get_style ( widget_formulaire_operations[1] ) == style_entree_formulaire[1])       && (gtk_widget_get_style ( widget_formulaire_operations[7] ) == style_entree_formulaire[1]) )    {      entree_prend_focus ( widget_formulaire_operations[1] );      gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[1] ),			   date_jour() );      /* si le click est sur l'entre de la date, on la slectionne et elle prend le focus */      if ( GPOINTER_TO_INT ( no_origine ) == 1 )	{	  if ( ev )	    gtk_signal_emit_stop_by_name ( GTK_OBJECT ( entree ),					   "button_press_event");	  gtk_entry_select_region ( GTK_ENTRY ( entree ),				    0,				    -1);	  gtk_widget_grab_focus ( GTK_WIDGET ( entree ));	}    }  else    if (gtk_widget_get_style ( widget_formulaire_operations[1] ) == style_entree_formulaire[1])      {	entree_prend_focus ( widget_formulaire_operations[7] );	/* si le click est sur l'entre de la date, on la slectionne et elle prend le focus */	if ( GPOINTER_TO_INT ( no_origine ) == 1 )	  {	    if ( ev )	      gtk_signal_emit_stop_by_name ( GTK_OBJECT ( entree ),					     "button_press_event");	    gtk_entry_select_region ( GTK_ENTRY ( entree ),				      0,				      -1);	    gtk_widget_grab_focus ( GTK_WIDGET ( entree ));	  }      }  /*   si ev est null ( cad que a ne vient pas d'un click mais appel par ex  la fin */  /* de fin_edition ), on se barre */  if ( !ev )    return;  /* numration suivant l'entre o on clique */  switch ( GPOINTER_TO_INT ( no_origine ))    {    case 1:      /* click sur l'entre de la date */      /* si double click, on popup le calendrier */      if ( ev->type == GDK_2BUTTON_PRESS )	{	  GtkWidget *popup;	  GtkWidget *popup_boxv;	  GtkRequisition *taille_entree;	  gint x, y;	  GtkWidget *calendrier;	  int cal_jour, cal_mois, cal_annee;	  GtkWidget *bouton;	  GtkWidget *frame;	  /* cherche la position o l'on va mettre la popup */	  taille_entree = malloc ( sizeof ( GtkRequisition ));	  gdk_window_get_origin ( GTK_WIDGET ( entree ) -> window,				  &x,				  &y );	  gtk_widget_size_request ( GTK_WIDGET ( entree ),				    taille_entree );  	  y = y + taille_entree->height;	  /* cration de la popup */	  popup = gtk_window_new ( GTK_WINDOW_POPUP );	  gtk_window_set_modal ( GTK_WINDOW (popup),				 TRUE);	  gtk_widget_set_uposition ( GTK_WIDGET ( popup ),				     x,				     y );	  /* cration de l'intrieur de la popup */	  frame = gtk_frame_new ( NULL );	  gtk_container_add ( GTK_CONTAINER (popup),			      frame);	  gtk_widget_show ( frame );	  popup_boxv = gtk_vbox_new ( FALSE,				      5 );	  gtk_container_set_border_width ( GTK_CONTAINER ( popup_boxv ),					   5 );	  gtk_container_add ( GTK_CONTAINER ( frame ),			      popup_boxv);	  gtk_widget_show ( popup_boxv );	  if ( !( strlen ( g_strstrip ( gtk_entry_get_text ( GTK_ENTRY ( entree ))))		  &&		  sscanf ( gtk_entry_get_text ( GTK_ENTRY ( entree )),			   "%d/%d/%d",			   &cal_jour,			   &cal_mois,			   &cal_annee)))	    sscanf ( date_jour(),		     "%d/%d/%d",		     &cal_jour,		     &cal_mois,		     &cal_annee);      	  calendrier = gtk_calendar_new();	  gtk_calendar_select_month ( GTK_CALENDAR ( calendrier ),				      cal_mois-1,				      cal_annee);	  gtk_calendar_select_day  ( GTK_CALENDAR ( calendrier ),				     cal_jour);	  gtk_calendar_display_options ( GTK_CALENDAR ( calendrier ),					 GTK_CALENDAR_SHOW_HEADING |					 GTK_CALENDAR_SHOW_DAY_NAMES |					 GTK_CALENDAR_WEEK_START_MONDAY );	  gtk_signal_connect ( GTK_OBJECT ( calendrier),			       "day_selected_double_click",			       GTK_SIGNAL_FUNC ( date_selectionnee ),			       popup );	  gtk_signal_connect ( GTK_OBJECT ( popup ),			       "key_press_event",			       GTK_SIGNAL_FUNC ( touche_calendrier ),			       NULL );	  gtk_box_pack_start ( GTK_BOX ( popup_boxv ),			       calendrier,			       TRUE,			       TRUE,			       0 );	  gtk_widget_show ( calendrier );	  /* ajoute le bouton annuler */	  bouton = gtk_button_new_with_label ( _("Cancel") );	  gtk_signal_connect_object ( GTK_OBJECT ( bouton ),				      "clicked",				      GTK_SIGNAL_FUNC ( ferme_calendrier ),				      GTK_OBJECT ( popup ) );	  gtk_box_pack_start ( GTK_BOX ( popup_boxv ),			       bouton,			       TRUE,			       TRUE,			       0 );	  gtk_widget_show ( bouton );	  gtk_widget_show (popup);      	  gdk_pointer_grab ( popup -> window, 			     TRUE,			     GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |			     GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |			     GDK_POINTER_MOTION_MASK,			     NULL, 			     NULL, 			     GDK_CURRENT_TIME );	}      break;    case 7:      /* click sur l'entre de la date relle*/      /* si double click, on popup le calendrier */      if ( ev->type == GDK_2BUTTON_PRESS ) 	{ 	  GtkWidget *popup; 	  GtkWidget *popup_boxv; 	  GtkRequisition *taille_entree; 	  gint x, y; 	  GtkWidget *calendrier; 	  int cal_jour, cal_mois, cal_annee; 	  GtkWidget *bouton; 	  GtkWidget *frame;  	  /* cherche la position o l'on va mettre la popup */ 	  taille_entree = malloc ( sizeof ( GtkRequisition )); 	  gdk_window_get_origin ( GTK_WIDGET ( entree ) -> window, 				  &x, 				  &y ); 	  gtk_widget_size_request ( GTK_WIDGET ( entree ), 				    taille_entree ); 	  y = y + taille_entree->height; 	  /* cration de la popup */ 	  popup = gtk_window_new ( GTK_WINDOW_POPUP ); 	  gtk_window_set_modal ( GTK_WINDOW (popup), 				 TRUE); 	  gtk_widget_set_uposition ( GTK_WIDGET ( popup ), 				     x, 				     y ); 	  /* cration de l'intrieur de la popup */ 	  frame = gtk_frame_new ( NULL ); 	  gtk_container_add ( GTK_CONTAINER (popup), 			      frame); 	  gtk_widget_show ( frame ); 	  popup_boxv = gtk_vbox_new ( FALSE, 				      5 ); 	  gtk_container_set_border_width ( GTK_CONTAINER ( popup_boxv ), 					   5 ); 	  gtk_container_add ( GTK_CONTAINER ( frame ), 			      popup_boxv); 	  gtk_widget_show ( popup_boxv ); 	  if ( !( strlen ( g_strstrip ( gtk_entry_get_text ( GTK_ENTRY ( entree )))) 		  && 		  sscanf ( gtk_entry_get_text ( GTK_ENTRY ( entree )), 			   "%d/%d/%d", 			   &cal_jour, 			   &cal_mois, 			   &cal_annee))) 	    sscanf ( date_jour(), 		     "%d/%d/%d", 		     &cal_jour, 		     &cal_mois, 		     &cal_annee); 	  calendrier = gtk_calendar_new(); 	  gtk_calendar_select_month ( GTK_CALENDAR ( calendrier ), 				      cal_mois-1, 				      cal_annee); 	  gtk_calendar_select_day  ( GTK_CALENDAR ( calendrier ), 				     cal_jour); 	  gtk_calendar_display_options ( GTK_CALENDAR ( calendrier ), 					 GTK_CALENDAR_SHOW_HEADING | 					 GTK_CALENDAR_SHOW_DAY_NAMES | 					 GTK_CALENDAR_WEEK_START_MONDAY ); 	  gtk_signal_connect ( GTK_OBJECT ( calendrier), 			       "day_selected_double_click", 			       GTK_SIGNAL_FUNC ( date_bancaire_selectionnee ), 			       popup ); 	  gtk_signal_connect ( GTK_OBJECT ( popup ), 			       "key_press_event", 			       GTK_SIGNAL_FUNC ( touche_calendrier ), 			       NULL ); 	  gtk_box_pack_start ( GTK_BOX ( popup_boxv ), 			       calendrier, 			       TRUE, 			       TRUE, 			       0 ); 	  gtk_widget_show ( calendrier ); 	  /* ajoute le bouton annuler */ 	  bouton = gtk_button_new_with_label ( _("Cancel") ); 	  gtk_signal_connect_object ( GTK_OBJECT ( bouton ), 				      "clicked", 				      GTK_SIGNAL_FUNC ( ferme_calendrier ), 				      GTK_OBJECT ( popup )); 	  gtk_box_pack_start ( GTK_BOX ( popup_boxv ), 			       bouton, 			       TRUE, 			       TRUE, 			       0 ); 	  gtk_widget_show ( bouton ); 	  gtk_widget_show (popup); 	  gdk_pointer_grab ( popup -> window, 			     TRUE, 			     GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | 			     GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | 			     GDK_POINTER_MOTION_MASK, 			     NULL, 			     NULL, 			     GDK_CURRENT_TIME ); 	  gtk_widget_grab_focus ( GTK_WIDGET ( popup )); 	}      break;    default:    }}