+2009-05-14 Claudio Saavedra <csaavedra@igalia.com>
+
+ * hildon/hildon-note-private.h: Add idle_handler to the private data.
+ * hildon/hildon-note.c (hildon_note_init), (hildon_note_finalize),
+ (on_show_cb), (sound_handling): Disconnect the idle handler for
+ the sound when the note is finalized to avoid possible crashes.
+
+ Fixes: NB#116786 (Image viewer crases whie trying to launch menu,
+ in a scenario)
+
2009-05-13 Artem Egorkine <ext-artem.egorkine@nokia.com>
* src/hildon-animation-actor.c,
priv->event_box = gtk_event_box_new ();
priv->icon = NULL;
priv->stock_icon = NULL;
+ priv->idle_handler = 0;
gtk_event_box_set_visible_window (GTK_EVENT_BOX (priv->event_box), FALSE);
gtk_event_box_set_above_child (GTK_EVENT_BOX (priv->event_box), TRUE);
g_free (priv->stock_icon);
priv->stock_icon = NULL;
}
+ if (priv->idle_handler) {
+ g_source_remove (priv->idle_handler);
+ priv->idle_handler = 0;
+ }
if (priv->progressbar)
g_object_unref (priv->progressbar);
on_show_cb (GtkWidget *widget,
gpointer data)
{
- g_idle_add (sound_handling, widget);
+ HildonNotePrivate *priv;
+
+ priv = HILDON_NOTE_GET_PRIVATE (widget);
+ priv->idle_handler = g_idle_add (sound_handling, widget);
}
/* We play a system sound when the note comes visible */
break;
};
+ priv->idle_handler = 0;
+
return FALSE;
}