title: GtkGrid is not showing new widgets attached to it
body: <p>I've decided to make a toy application in which I resize a table of labels by adding rows/cols of elements to GtkGrid.</p>
  
  <p>When adding a new element to the GtkGrid from inside a button callback function, the grid widget updates its size, but fails to update the contents.</p>
  
  <pre><code>#include &lt;gtk/gtk.h&gt;
  
  static void kaboom(GtkWidget*, gpointer);
  static void minusVert(GtkWidget*, gpointer);
  static void plusVert(GtkWidget*, gpointer);
  
  static int x = 1;
  static int y = 1;
  
  int main(int argc, char** argv) {
      GtkWidget* window, *subs, *buts, *grid, *button;
  
      gtk_init(&amp;argc, &amp;argv);
  
      window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
      gtk_window_set_title(GTK_WINDOW(window), "Playground!!");
      gtk_widget_set_size_request(window, 200, 50);
  
      g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(kaboom), NULL);
  
      subs = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
      gtk_container_add(GTK_CONTAINER(window), subs);
  
      grid = gtk_grid_new();
      gtk_paned_pack1(GTK_PANED(subs), grid, true, false);
  
      gtk_grid_set_row_homogeneous(GTK_GRID(grid), true);
      gtk_grid_set_column_homogeneous(GTK_GRID(grid), true);
  
      gtk_grid_attach(GTK_GRID(grid), gtk_label_new("×"), 0, 0, 1, 1);
  
      buts = gtk_grid_new();
      gtk_paned_pack2(GTK_PANED(subs), buts, false, false);
  
      gtk_grid_set_row_homogeneous(GTK_GRID(grid), true);
      gtk_grid_set_column_homogeneous(GTK_GRID(buts), true);
  
      gtk_grid_attach(GTK_GRID(buts), gtk_label_new("Vertical"), 0, 0, 2, 1);
  
      button = gtk_button_new_with_label("-");
      g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(minusVert), grid);
      gtk_grid_attach(GTK_GRID(buts), button, 0, 1, 1, 1);
  
      button = gtk_button_new_with_label("+");
      g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(plusVert), grid);
      gtk_grid_attach(GTK_GRID(buts), button, 1, 1, 1, 1);
  
      gtk_grid_attach(GTK_GRID(buts), gtk_label_new("Horizontal"), 2, 0, 2, 1);
  
      button = gtk_button_new_with_label("-");
      gtk_grid_attach(GTK_GRID(buts), button, 2, 1, 1, 1);
  
      button = gtk_button_new_with_label("+");
      gtk_grid_attach(GTK_GRID(buts), button, 3, 1, 1, 1);
  
      gtk_widget_show_all(window);
  
      gtk_main();
  
      return 0;
  }
  
  static void kaboom(GtkWidget* window, gpointer data) {
      gtk_main_quit();
  }
  
  static void minusVert(GtkWidget *button, gpointer data) {
      if (y &gt; 1) {
          // Remove all the elems in the last row
          for (int i = 0; i &lt; x; ++i) {
              gtk_widget_destroy(gtk_grid_get_child_at(GTK_GRID(data), i, y - 1));
          }
          --y;
      }
  }
  
  static void plusVert(GtkWidget *button, gpointer data) {
      for (int i = 0; i &lt; x; ++i) {
          // Add the new row
          gtk_grid_attach(GTK_GRID(data), gtk_label_new("×"), i, y, 1, 1);
      }
      ++y;
  }
  </code></pre>
  
  <p>The screenshots before and after:</p>
  
  <p><img src="https://i.stack.imgur.com/SQsjT.png" alt="The screenshots before and after"></p>
  
  <p>My question is: how can I make the new labels attached to the <code>GtkGrid</code> visible?</p>
  
  <p>Notes: I'm using C++, but not GTKmm, because I'm working my way through a book written for GTK+. Even if ported to pure C the application behaves the same.</p>