comparison pidgin/gtkstatusbox.c @ 21913:2a591a5b3322

Make some more event handlers return appropriate gboolean values. This turns out to be a pretty important thing to do. Not returning FALSE from a delete_event callback would, for example, only hide a widget, instead of destroying it, which can cause leaks.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 21 Dec 2007 14:19:29 +0000
parents 665e04562de0
children d3a4c98c01b7
comparison
equal deleted inserted replaced
21912:6765b2b65d30 21913:2a591a5b3322
1098 else if (event->direction == GDK_SCROLL_DOWN) 1098 else if (event->direction == GDK_SCROLL_DOWN)
1099 gtk_imhtml_page_down(imhtml); 1099 gtk_imhtml_page_down(imhtml);
1100 return TRUE; 1100 return TRUE;
1101 } 1101 }
1102 1102
1103 static int imhtml_remove_focus(GtkWidget *w, GdkEventKey *event, PidginStatusBox *status_box) 1103 static gboolean imhtml_remove_focus(GtkWidget *w, GdkEventKey *event, PidginStatusBox *status_box)
1104 { 1104 {
1105 if (event->keyval == GDK_Tab || event->keyval == GDK_KP_Tab) 1105 if (event->keyval == GDK_Tab || event->keyval == GDK_KP_Tab)
1106 { 1106 {
1107 /* If last inserted character is a tab, then remove the focus from here */ 1107 /* If last inserted character is a tab, then remove the focus from here */
1108 GtkWidget *top = gtk_widget_get_toplevel(w); 1108 GtkWidget *top = gtk_widget_get_toplevel(w);