[Glade-users] envoking 'activate' signal

Arthur Shats ashats at hotmail.com
Tue Sep 21 11:41:52 EDT 2010


Thanks,
Now a similar question about _activate handler. 
In my code I have _activate and _focus_out_event handlers. In the _activate handler I added some validity checks and want to do the same checks in the _focus_out_event. My question is, can I call simply call _activate handler from my _focus_out_event handler? 
Here is a sample code:
on_entry1_activate (GtkEntry *entry, gpointer user_data) {
 
   /* I have validity checks here */
}
 
on_entry1_focus_out_event (GtkWidget *widget, GdkEventFocus *event, gpointer user_data) {
 
  /* I want to do the same validity checks that were done in _activate handler */
 
  on_entry1_activate (GTK_ENTRY(widget), user_data); /* this seems to work, but is it a proper way to do it? */
}
 
Thanks.
 
> Date: Thu, 16 Sep 2010 16:18:46 +0100
> Subject: Re: [Glade-users] envoking 'clicked' signal
> From: johndelaney at gmail.com
> To: ashats at hotmail.com
> CC: glade-users at lists.ximian.com
> 
> On Thu, Sep 16, 2010 at 4:08 PM, Arthur Shats <ashats at hotmail.com> wrote:
> >    button = lookup_widget(GTK_WIDGET(entry), "btnNext");
> >    on_btnNext_clicked(GTK_BUTTON(button), user_data);  /** CAN I CALL THIS
> > HANDLER JUST LIKE THAT ????? **/
> 
> This would be a nicer way of doing it:
> 
> gtk_button_clicked (GTK_BUTTON (button));
> 
> http://library.gnome.org/devel/gtk/unstable/GtkButton.html#gtk-button-clicked
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20100921/e1e5b7f3/attachment.html 


More information about the Glade-users mailing list