GtkFileChooserDialog: something funny?



After updating to glib 2.18.1, gtk 2.14.3 and pango 1.22.0
I'm seeing some funny behavior from GtkFileChooserDialog,
which has started to emit a GLib-GObject-CRITICAL message
on destruction.

Simple test case, based on the example in the documentation
for GtkFileChooserDialog:

void gtk_file_selector_dummy (void) 
{
    GtkWidget *dialog;

    dialog = 
        gtk_file_chooser_dialog_new("Open File",
                                    NULL,
                                    GTK_FILE_CHOOSER_ACTION_OPEN,
                                    GTK_STOCK_CANCEL, 
                                    GTK_RESPONSE_CANCEL,
                                    GTK_STOCK_OPEN, 
                                    GTK_RESPONSE_ACCEPT,
                                    NULL);

    if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) 
    {
        gchar *filename;

        filename = 
          gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
        fprintf(stderr, "got filename '%s'\n", filename);
        g_free(filename);
    }

    fprintf(stderr, "destroying dialog\n");
    gtk_widget_destroy(dialog);
    fprintf(stderr, "dialog destroyed\n");
}

When I invoke this function I get:

destroying dialog

(gretl:15258): GLib-GObject-CRITICAL **: g_object_unref: assertion 
`G_IS_OBJECT (object)' failed
dialog destroyed

Any ideas on what's going on?

-- 
Allin Cottrell
Department of Economics
Wake Forest University




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