Re: treeview---->cursor-changed--->destroy---->seg fault
- From: Tim Müller <zen18864 zen co uk>
- To: pvmathew softhome net, gtk-app-devel-list gnome org
- Cc:
- Subject: Re: treeview---->cursor-changed--->destroy---->seg fault
- Date: Mon, 13 Sep 2004 21:30:15 +0100
On Monday 13 September 2004 16:07, P V Mathew wrote:
void my_signal(GtkTreeView *t,gpointer g)
{
static int n=1;
if (n != 1)
{
fprintf(stderr,"%s\n","signal received");
n = 1;
gtk_widget_destroy(((struct allv*)g)->win);
//MainWindow();
}
else
n++;
}
Just don't do it in the signal callback itself, but rather use something like:
static gboolean
destroy_treeview (gpointer w)
{
gtk_widget_destroy (GTK_WIDGET (w));
return FALSE; /* don't call again */
}
void
my_signal (GtkTreeView *t,gpointer g)
{
g_idle_add (destroy_treeview, ((struct allv*)g)->win);
}
Cheers
-Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]