title: gtk_container_get_children
body: <p><img src="https://i.stack.imgur.com/iMGIJ.png" alt="enter image description here">When list of stations is printed in Preset rol list and you are at the begining or at the end of the list, you see many empty items.
  I create list of about 20 stations and try to display them, go to the begining and to the end of the list.
  I think the problem is in this piece of code:</p>
  
  <pre><code>static void add_button_clicked_cb(GtkWidget *widget, gpointer data)
  {
      preset *ps;
      gchar *buffer;
      GtkTreeIter iter = {0};
      GtkAdjustment* v_scb;
      GtkTreePath *path = NULL;
      GList* menuitems;
      GtkWidget *menuitem;
  
      ps = malloc(sizeof(preset));
      ps-&gt;title = g_strdup(_("unnamed"));
      ps-&gt;freq = rint(gtk_adjustment_get_value(adj)) / STEPS;
      settings.presets = g_list_append(settings.presets, (gpointer) ps);
      buffer = g_strdup_printf("%.2f", ps-&gt;freq);
  
      gtk_list_store_append(list_store, &amp;iter);
      gtk_list_store_set(list_store, &amp;iter, 0, ps-&gt;title, 1, buffer, -1);
  
      g_free(buffer);
      gtk_tree_selection_unselect_all(selection);
  
      v_scb = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(list_view));
      gtk_adjustment_set_value(v_scb, gtk_adjustment_get_upper(v_scb));
  
      if (main_visible) {
          gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(preset_combo), ps-&gt;title);
          mom_ps = g_list_length(settings.presets) - 1;
          preset_combo_set_item(mom_ps);
  
          menuitems = gtk_container_get_children(GTK_CONTAINER(tray_menu));
          menuitem = gtk_menu_item_new_with_label(ps-&gt;title); 
  
          gtk_menu_shell_insert(GTK_MENU_SHELL(tray_menu), menuitem, mom_ps);     
          g_signal_connect(G_OBJECT(menuitem), "activate", (GCallback)preset_menuitem_activate_cb, (gpointer)mom_ps);
          gtk_widget_show(menuitem);
      }
  
      buffer = g_strdup_printf("%d", g_list_length(settings.presets) - 1);
      path = gtk_tree_path_new_from_string(buffer);
      g_free(buffer);
      gtk_tree_view_set_cursor(GTK_TREE_VIEW(list_view), path, NULL, FALSE);
      gtk_tree_path_free(path);
  }
  </code></pre>
  
  <p>Could you please suggest me how can correct it?</p>