Skip to content


css: use parsing-error signal to warn on bad css file or image
Browse files Browse the repository at this point in the history
Thanks to Alberts Muktupāvels for this code
  • Loading branch information
lukefromdc authored and raveit65 committed Apr 26, 2018
1 parent 2170446 commit 38dbd34
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mate-panel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ static const GOptionEntry options[] = {
{ NULL }

static void
parsing_error_cb (GtkCssProvider *provider,
GtkCssSection *section,
GError *error,
gpointer user_data)
g_warning ("Can't parse mate-panel's CSS custom description: %s\n", error->message);

main (int argc, char **argv)
Expand Down Expand Up @@ -178,6 +187,8 @@ main (int argc, char **argv)
resource = "/org/mate/panel/theme/mate-panel.css";

g_signal_connect (provider, "parsing-error", G_CALLBACK (parsing_error_cb), NULL);

gtk_css_provider_load_from_resource (css, resource);
gtk_style_context_add_provider_for_screen (screen, provider, priority);

Expand Down

0 comments on commit 38dbd34

Please sign in to comment.