Mercurial > dwindows
changeset 2243:8f9ffba67b7c
Editor on Linux really screwed up the formatting. Purely a formatting fix commit.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 19 Jan 2021 14:07:47 +0000 |
parents | 0c0ad67aacb5 |
children | a1ac35abd5fd |
files | gtk3/dw.c |
diffstat | 1 files changed, 29 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- 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); } /*