Window destroying!



Hi,

Sorry to be a bother folks! I appreciate the quick answers so far!

With this bit of code, after I destroy the window the test with
gtk_widget_show() in it still passes. What I am doing wrong now?

void xmark_destroyed(GtkWidget *lwindow, GdkEvent *event, gpointer *data)
{
  gtk_widget_destroy(lwindow);
  lwindow=NULL;
// delete some other stuff too
}

void markx()
{
  static GtkWidget *lwindow=NULL;
// other stuff
  if (lwindow!=NULL)
  {
    gtk_widget_show(lwindow);
    printf("NOT NULL\n");
    return;
  } 

  lwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_signal_connect (GTK_OBJECT (lwindow), "destroy",
                      GTK_SIGNAL_FUNC(xmark_destroyed), NULL);

Cheers

Rich



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]