title: GTK3 : gtk_widget_destroy versus gtk_widget_hide
body: <p>Here a short MCV to illustrate the problem I meet :</p>
  
  <p>I call a dialog box from my main window.
  I click on one of the buttons from the dialog (usual way I think)
  If I click again on one button, dialog will not display again (I got a bunch of   errors instead).
  This doesn't happen of I use gtk_widget_hide instead.
  (interfaces are designed with Glade3)</p>
  
  <pre><code>typedef struct {
      GtkBuilder *builder;
      gchar *stuff;
  } Context;
  
  void conDisplay(GtkWidget *g, gpointer userdata) {
      GtkWidget *dlg, *parent;
      Context *ctx=(Context *)userdata;
      int ret=0;
  
      g_printerr("clicked\n");
  
      parent=GTK_WIDGET(gtk_builder_get_object(ctx-&gt;builder,(gchar *)"MCV"));
      if (ctx-&gt;stuff) {
          g_printerr("Already connected\n");
          dlg=GTK_WIDGET(gtk_builder_get_object(ctx-&gt;builder,(gchar *)"question"));
          gtk_window_set_transient_for(GTK_WINDOW(dlg),GTK_WINDOW(parent));
          ret=gtk_dialog_run(dlg);
          if (ret==-3) { // OK clicked
              g_printerr("OK from Already connected\n");
          }
          else { g_printerr("Unknown\n"); }
          gtk_window_set_transient_for(GTK_WINDOW(dlg),NULL);
          gtk_widget_destroy(GTK_WIDGET(dlg));
      } else {
          dlg=GTK_WIDGET(gtk_builder_get_object(ctx-&gt;builder,(gchar *)"connect"));
          gtk_window_set_transient_for(GTK_WINDOW(dlg),GTK_WINDOW(parent));
          ret=gtk_dialog_run(dlg);
          if (ret==-1) { // GO clicked
              g_printerr("GO\n");
              ctx-&gt;stuff="Hello";
          }
          else { g_printerr("Cancel\n"); }
          gtk_window_set_transient_for(GTK_WINDOW(dlg),NULL);
          gtk_widget_destroy(GTK_WIDGET(dlg));
      }
  }
  
  int main(int argc, char **argv)
  {
      Context ctx;
      GtkWidget *mainwin;
      GtkWidget *btnCon;
      GError *error=NULL;
  
      /* Init GTK+ */
      gtk_init(&amp;argc,&amp;argv);
      ctx.builder=gtk_builder_new();
      ctx.stuff=NULL;
      // Load UI from file.
      gtk_builder_add_from_file(ctx.builder,"mcv.glade",&amp;error);
  
      mainwin=GTK_WIDGET(gtk_builder_get_object(ctx.builder,(gchar *)"MCV"));
      btnCon=GTK_WIDGET(gtk_builder_get_object(ctx.builder,(gchar *)"con"));
      g_signal_connect(btnCon, "clicked", (GCallback)conDisplay, &amp;ctx);
  
      gtk_widget_show_all(mainwin);
  
      gtk_main();
      return 0;
  }
  </code></pre>
  
  <p>Thanks for your help !</p>
  
  <p>Best regards.</p>
  
  <p>V.</p>