Hi,

    I'll just reply to my own post with an example on how to reproduce 
the error-dump. This is no pretty program which simply either inserts or 
removes the same widget every other time the window close widget is 
clicked - just to keep it brief. Who might I contact regarding this issue??

GtkWidget *window;
GtkWidget *file_widget;
gboolean delete_event(GtkWidget *widget, GdkEvent *event, WindowThread 
*_this)
{
    if(GtkWidget *sub = gtk_bin_get_child(GTK_BIN(window)))
        gtk_container_remove(GTK_CONTAINER(window), sub);
    else
        gtk_container_add(GTK_CONTAINER(window), file_widget);
    return TRUE;
}


int main()
{
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
file_widget = gtk_file_chooser_widget_new(GTK_FILE_CHOOSER_ACTION_SAVE);
g_object_ref(file_widget);
g_signal_connect(G_OBJECT(window), "delete_event", 
G_CALLBACK(delete_event), 0);
gtk_container_add(GTK_CONTAINER(window), file_widget);
gtk_widget_show_all(window);
gtk_main();
return 0;
}

    br - N :o)



Nikolaj Thygesen wrote:
> Hi list,
>
>     I wonder if anyone here has ever used the GtkFileChooserWidget 
> directly?? When I create the widget and add it to a window everything 
> goes ok - but if I close the window (I did add an extra 
> "g_object_ref(widget);" to the widget keeping it alive) and open a new 
> window adding the same widget to it  - or - alternatively remove the 
> GtkFileChooserWidget from the window and re-adds the very same widget 
> then I get errors like:
>
> (DiamondBOX:18575): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion 
> `path != NULL' failed
>
> (DiamondBOX:18575): Gtk-CRITICAL **: gtk_list_store_set_valist: 
> assertion `VALID_ITER (iter, list_store)' failed
>
> (DiamondBOX:18575): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion 
> `path != NULL' failed
>
> (DiamondBOX:18575): Gtk-CRITICAL **: gtk_list_store_set_valist: 
> assertion `VALID_ITER (iter, list_store)' failed
>
> (DiamondBOX:18575): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion 
> `path != NULL' failed
>
> (DiamondBOX:18575): Gtk-CRITICAL **: gtk_list_store_set_valist: 
> assertion `VALID_ITER (iter, list_store)' failed
>
> when displaying the window. Is this expected behaviour or a bug??? 
> Perhaps I could do something to prepare the widget for the later 
> re-appearance??
>
>     best regards - Nikolaj Thygesen
>
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
>   

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to