From 68f27ce0c8a3ed44d1f1105970cc68326df6bad3 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Thu, 12 Sep 2013 15:29:58 +0200 Subject: Bug #706008 - Workaround gnome-shell style change on focus change Avoid redrawing (thus loosing the selection and scroll position) of preview window on style change by defining the colors through CSS styles. On style change we just update the CSS color definitions and preview will update itself without redraw. --- calendar/gui/e-cal-component-preview.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'calendar/gui/e-cal-component-preview.c') diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index ffaba3f84b..c96e0641a2 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -205,8 +205,6 @@ cal_component_preview_write_html (ECalComponentPreview *preview, icalproperty_status status; const gchar *location; gint *priority_value; - GtkStyle *style; - GtkStateType state; client = preview->priv->client; comp = preview->priv->comp; @@ -216,14 +214,8 @@ cal_component_preview_write_html (ECalComponentPreview *preview, /* write document header */ e_cal_component_get_summary (comp, &text); - style = gtk_widget_get_style (GTK_WIDGET (preview)); - state = gtk_widget_get_state (GTK_WIDGET (preview)); - g_string_append (buffer, HTML_HEADER); - g_string_append_printf ( - buffer, "", - e_color_to_value (&style->base[state]), - e_color_to_value (&style->text[state])); + g_string_append (buffer, ""); if (text.value) g_string_append_printf (buffer, "

%s

", text.value); -- cgit