Mercurial > pidgin.yaz
comparison pidgin/gtknotify.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 | c88a3f2dbb52 |
children | c38d72677c8a |
comparison
equal
deleted
inserted
replaced
21912:6765b2b65d30 | 21913:2a591a5b3322 |
---|---|
164 gtk_widget_destroy(mail_dialog->dialog); | 164 gtk_widget_destroy(mail_dialog->dialog); |
165 g_free(mail_dialog); | 165 g_free(mail_dialog); |
166 mail_dialog = NULL; | 166 mail_dialog = NULL; |
167 } | 167 } |
168 | 168 |
169 static void | 169 static gboolean |
170 formatted_close_cb(GtkWidget *win, GdkEvent *event, void *user_data) | 170 formatted_close_cb(GtkWidget *win, GdkEvent *event, void *user_data) |
171 { | 171 { |
172 purple_notify_close(PURPLE_NOTIFY_FORMATTED, win); | 172 purple_notify_close(PURPLE_NOTIFY_FORMATTED, win); |
173 } | 173 return FALSE; |
174 | 174 } |
175 static void | 175 |
176 static gboolean | |
176 searchresults_close_cb(PidginNotifySearchResultsData *data, GdkEvent *event, gpointer user_data) | 177 searchresults_close_cb(PidginNotifySearchResultsData *data, GdkEvent *event, gpointer user_data) |
177 { | 178 { |
178 purple_notify_close(PURPLE_NOTIFY_SEARCHRESULTS, data); | 179 purple_notify_close(PURPLE_NOTIFY_SEARCHRESULTS, data); |
180 return FALSE; | |
179 } | 181 } |
180 | 182 |
181 static void | 183 static void |
182 searchresults_callback_wrapper_cb(GtkWidget *widget, PidginNotifySearchResultsButtonData *bd) | 184 searchresults_callback_wrapper_cb(GtkWidget *widget, PidginNotifySearchResultsButtonData *bd) |
183 { | 185 { |