Re: Do we need the GtkUIManager::remove_widget signal ?



On Sat, Aug 30, 2003 at 01:22:34AM +0200, Matthias Clasen wrote: 
> 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);

It would seem slightly cleaner to me if you connected to "destroy" on
the widget, but I'm not sure why I think that. 

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

My feeling is that remove_widget is pointless.

Havoc




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