- int i;
- for (i = 0; i < 5; ++i)
- {
- gtk_widget_modify_bg (dest, i, >k_widget_get_style (src)->base[i]);
- gtk_widget_modify_fg (dest, i, >k_widget_get_style (src)->text[i]);
- }
-}
-
-/* Copy the base style from the parent widget to the container and all its
- children. We do this because the container's primary purpose is to display
- text. This way psppire appears to follow the chosen gnome theme. */
-static void
-on_style_set (GtkWidget *toplevel, GtkStyle *prev,
- struct psppire_output_view *view)
-{
- copy_base_to_bg (GTK_WIDGET (view->output), toplevel);
- gtk_container_foreach (GTK_CONTAINER (view->output),
- (GtkCallback) copy_base_to_bg, view->output);
-}
-
-static void
-on_dwgarea_realize (GtkWidget *dwg_area, gpointer data)
-{
- copy_base_to_bg (dwg_area, gtk_widget_get_toplevel (dwg_area));
+ if (!view->n_items || !gtk_widget_get_window (GTK_WIDGET (view->output)))
+ return;
+ string_map_clear (&view->render_opts);
+ xr_driver_destroy (view->xr);
+ create_xr (view);
+ rerender (view);