Skip to content


Weather: apply a widget name to the textview
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lukefromdc committed Jul 20, 2018
1 parent 1cd86c7 commit 43b16f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mateweather/mateweather-dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_for_screen (gtk_widget_get_screen (widget),
provider_added = TRUE;
Expand Down

0 comments on commit 43b16f7

Please sign in to comment.