+2009-01-23 Alberto Garcia <agarcia@igalia.com>
+
+ * src/hildon-banner.c (hildon_banner_button_press_event): Hide
+ banners instead of destroying them when they receive a button
+ press.
+
2009-01-23 Alejandro G. Castro <alex@igalia.com>
Reverted commit 34028, it was causing regressions, probably the
hildon_banner_button_press_event (GtkWidget* widget,
GdkEventButton* event)
{
- gboolean result = simulate_close (widget);
-
- if (!result) {
- /* signal emission not stopped - basically behave like
- * gtk_main_do_event() for a delete event */
- gtk_widget_destroy (widget);
- }
+ gboolean result = simulate_close (widget);
+
+ if (!result) {
+ /* signal emission not stopped - basically behave like
+ * gtk_main_do_event() for a delete event, but just hide the
+ * banner instead of destroying it, as it is already meant to
+ * be destroyed by hildon_banner_timeout() (if it's timed) or
+ * the application (if it's not). */
+ gtk_widget_hide (widget);
+ }
- return result;
+ return result;
}
/* We start the timer for timed notifications after the window appears on screen */