- int red = def->bg[GTK_STATE_SELECTED].red;
- int green = def->bg[GTK_STATE_SELECTED].green;
- int blue = def->bg[GTK_STATE_SELECTED].blue;
+ if (!def)
+ def = gtk_widget_get_default_style();
+ if (def)
+ {
+ int red = def->bg[GTK_STATE_SELECTED].red;
+ int green = def->bg[GTK_STATE_SELECTED].green;
+ int blue = def->bg[GTK_STATE_SELECTED].blue;
+ g_systemHighlightColour =
+ new wxColour( red >> SHIFT,
+ green >> SHIFT,
+ blue >> SHIFT );
+ }
+ else
+ {
+ g_systemHighlightColour =
+ new wxColour( 0 >> SHIFT,
+ 0 >> SHIFT,
+ 0x9c40 >> SHIFT );
+ }