gtk_color_selection_dialog problem



There's something I'm missing.  I built a trivial color selector as
follows:

void my_color_selector (GtkWidget *w, gpointer p)
{
    GtkWidget *cdlg;

    cdlg = gtk_color_selection_dialog_new("my color selection");

    g_signal_connect(G_OBJECT
      (GTK_COLOR_SELECTION_DIALOG(cdlg)->ok_button),
                     "clicked", G_CALLBACK(color_ok), cdlg);
    g_signal_connect(G_OBJECT
      (GTK_COLOR_SELECTION_DIALOG(cdlg)->cancel_button),
                     "clicked", G_CALLBACK(color_cancel), cdlg);

    gtk_dialog_run(GTK_DIALOG(cdlg));
}

The callbacks are:

static void color_ok (GtkWidget *button, GtkWidget *dlg)
{
    fprintf(stderr, "Clicked OK\n");
    gtk_widget_destroy(dlg);
}

static void color_cancel (GtkWidget *button, GtkWidget *dlg)
{
    gtk_widget_destroy(dlg);
}

When I run this, I'm getting:

(myprog:11313): GLib-GObject-WARNING **: gsignal.c:2010:
instance
`0x8218ae8' has no handler with id `2559'

(myprog:11313): GLib-GObject-WARNING **: gsignal.c:2010:
instance
`0x8218ae8' has no handler with id `2560'

(myprog:11313): GLib-GObject-WARNING **: gsignal.c:2010:
instance
`0x8218ae8' has no handler with id `2561'

(myprog:11313): GLib-GObject-WARNING **: gsignal.c:2010:
instance
`0x8218ae8' has no handler with id `2562'

Where instance `0x8218ae8' is the color selection dialog, cdlg.

Anyone tell me what I'm doing wrong?  Thanks very much.

-- 
Allin Cottrell
Department of Economics
Wake Forest University, NC



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