Do we need the GtkUIManager::remove_widget signal ?



Currently, this is not emitted at all, and I wonder if it is needed,
since the following seems to work fine for removing the handlebox
together with the toolbar it contains:


static void
add_widget (GtkUIManager *merge, 
	    GtkWidget    *widget, 
	    GtkBox       *box)
{
  GtkWidget *handle_box;

  if (GTK_IS_TOOLBAR (widget))
    {
      handle_box = gtk_handle_box_new ();
      gtk_widget_show (handle_box);
      gtk_container_add (GTK_CONTAINER (handle_box), widget);
      gtk_box_pack_start (box, handle_box, FALSE, FALSE, 0);
      g_signal_connect (handle_box, "remove", gtk_widget_destroy, 0);
    }
  else
    gtk_box_pack_start (box, widget, FALSE, FALSE, 0);
    
  gtk_widget_show (widget);
}


So, can GtkUIManager::remove_widget go, or should it be emitted (if only
for symmetry with ::add_widget) ?

Matthias




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