# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1611065267 0 # Node ID 8f9ffba67b7c5f1b6eff3560f8513b607e60ebfe # Parent 0c0ad67aacb54281e9f0e1e49c58cf5f2cee8f51 Editor on Linux really screwed up the formatting. Purely a formatting fix commit. diff -r 0c0ad67aacb5 -r 8f9ffba67b7c gtk3/dw.c --- a/gtk3/dw.c Tue Jan 19 13:59:57 2021 +0000 +++ b/gtk3/dw.c Tue Jan 19 14:07:47 2021 +0000 @@ -2715,25 +2715,25 @@ /* If we have an old context from a previous override remove it */ if(provider) { - gtk_style_context_remove_provider(scontext, GTK_STYLE_PROVIDER(provider)); - g_object_unref(provider); - provider = NULL; + gtk_style_context_remove_provider(scontext, GTK_STYLE_PROVIDER(provider)); + g_object_unref(provider); + provider = NULL; } /* If we have a new color, create a new provider and add it */ - if(color) - { - gchar *scolor = gdk_rgba_to_string(color); - gchar *css = g_strdup_printf ("* { %s: %s; }", element, scolor); - - provider = gtk_css_provider_new(); - g_free(scolor); - gtk_css_provider_load_from_data(provider, css, -1, NULL); - g_free(css); - gtk_style_context_add_provider(scontext, GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - } - g_object_set_data(G_OBJECT(widget), dataname, (gpointer)provider); - g_free(dataname); + if(color) + { + gchar *scolor = gdk_rgba_to_string(color); + gchar *css = g_strdup_printf ("* { %s: %s; }", element, scolor); + + provider = gtk_css_provider_new(); + g_free(scolor); + gtk_css_provider_load_from_data(provider, css, -1, NULL); + g_free(css); + gtk_style_context_add_provider(scontext, GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + } + g_object_set_data(G_OBJECT(widget), dataname, (gpointer)provider); + g_free(dataname); } static void _dw_override_font(GtkWidget *widget, const char *font) @@ -2744,22 +2744,22 @@ /* If we have an old context from a previous override remove it */ if(provider) { - gtk_style_context_remove_provider(scontext, GTK_STYLE_PROVIDER(provider)); - g_object_unref(provider); - provider = NULL; + gtk_style_context_remove_provider(scontext, GTK_STYLE_PROVIDER(provider)); + g_object_unref(provider); + provider = NULL; } /* If we have a new font, create a new provider and add it */ - if(font) - { - gchar *css = g_strdup_printf ("* { font: %s; }", font); - - provider = gtk_css_provider_new(); - gtk_css_provider_load_from_data(provider, css, -1, NULL); - g_free(css); - gtk_style_context_add_provider(scontext, GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - } - g_object_set_data(G_OBJECT(widget), "_dw_font", (gpointer)provider); + if(font) + { + gchar *css = g_strdup_printf ("* { font: %s; }", font); + + provider = gtk_css_provider_new(); + gtk_css_provider_load_from_data(provider, css, -1, NULL); + g_free(css); + gtk_style_context_add_provider(scontext, GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + } + g_object_set_data(G_OBJECT(widget), "_dw_font", (gpointer)provider); } /*