Advertisement
Guest User

Untitled

a guest
Dec 26th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.16 KB | None | 0 0
  1. diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
  2. index bdcd831..ddfbba7 100644
  3. --- a/panel-plugin/battery.c
  4. +++ b/panel-plugin/battery.c
  5. @@ -600,6 +600,7 @@ battmon.c:241: for each function it appears in.)
  6.      }
  7.  
  8.  #if GTK_CHECK_VERSION (3, 16, 0)
  9. +    static GtkCssProvider *current_css_provider = NULL;
  10.  #if GTK_CHECK_VERSION (3, 20, 0)
  11.      gchar * cssminsizes = "min-width: 4px; min-height: 0px";
  12.      if (gtk_orientable_get_orientation(GTK_ORIENTABLE(battmon->battstatus)) == GTK_ORIENTATION_HORIZONTAL)
  13. @@ -619,6 +620,13 @@ battmon.c:241: for each function it appears in.)
  14.          GTK_STYLE_PROVIDER (css_provider),
  15.          GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
  16.      g_free(css);
  17. +    if (current_css_provider) {
  18. +        gtk_style_context_remove_provider (
  19. +            GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (battmon->battstatus))),
  20. +            GTK_STYLE_PROVIDER (current_css_provider));
  21. +        g_object_unref (current_css_provider);
  22. +    }
  23. +    current_css_provider = css_provider;
  24.  #else
  25.      gtk_widget_override_background_color (GTK_WIDGET (battmon->battstatus), GTK_STATE_FLAG_NORMAL, color);
  26.  #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement