summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-07-20 00:52:42 -0400
committerlukefromdc <[email protected]>2018-07-20 00:52:42 -0400
commit43b16f78ab5fe08c8d2b8997d94c6aec5f1a36da (patch)
tree8e82aa7b34085a8f37a8d736508b5ff1e4b04263
parent1cd86c770936bf3adabef52c80f7e277daa871e6 (diff)
downloadmate-applets-43b16f78ab5fe08c8d2b8997d94c6aec5f1a36da.tar.bz2
mate-applets-43b16f78ab5fe08c8d2b8997d94c6aec5f1a36da.tar.xz
Weather: apply a widget name to the textview
This is necessary to allow use of gtk_style_context_add_provider_for_screen without applying the provider to other applets too if these applets are ever ported to run in-process.
-rw-r--r--mateweather/mateweather-dialog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c
index 02ea876b..a206c032 100644
--- a/mateweather/mateweather-dialog.c
+++ b/mateweather/mateweather-dialog.c
@@ -535,11 +535,12 @@ override_widget_font (GtkWidget *widget,
provider = gtk_css_provider_get_default ();
- css = g_strdup_printf ("textview { %s %s %s %s }", family, weight, style, size);
+ gtk_widget_set_name(GTK_WIDGET(widget), "MateWeatherAppletTextView");
+ css = g_strdup_printf ("#MateWeatherAppletTextView { %s %s %s %s }", family, weight, style, size);
gtk_css_provider_load_from_data (provider, css, -1, NULL);
if (!provider_added) {
- gtk_style_context_add_provider(gtk_widget_get_style_context(GTK_WIDGET(widget)),
+ gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (widget),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
provider_added = TRUE;