[gnome-logs] Remove custom CSS error reporting



commit 51aebfea225fb6c1c91a919c01a8e9973cefaf10
Author: Maximiliano Sandoval R <msandova gnome org>
Date:   Mon Oct 11 00:24:57 2021 +0200

    Remove custom CSS error reporting
    
    GTK 4 provides the error handling directly.

 src/gl-application.c |  3 ---
 src/gl-util.c        | 22 ----------------------
 src/gl-util.h        |  4 ----
 src/gl-window.c      |  3 ---
 4 files changed, 32 deletions(-)
---
diff --git a/src/gl-application.c b/src/gl-application.c
index dc9069c..dd47f1d 100644
--- a/src/gl-application.c
+++ b/src/gl-application.c
@@ -165,9 +165,6 @@ on_monospace_font_name_changed (GSettings *settings,
         css_fragment = g_strconcat (".event-monospace ", css_desc, NULL);
 
         provider = gtk_css_provider_new ();
-        g_signal_connect (provider, "parsing-error",
-                          G_CALLBACK (gl_util_on_css_provider_parsing_error),
-                          NULL);
         gtk_css_provider_load_from_data (provider, css_fragment, -1, NULL);
 
         gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
diff --git a/src/gl-util.c b/src/gl-util.c
index 2088a6a..b7469fc 100644
--- a/src/gl-util.c
+++ b/src/gl-util.c
@@ -46,28 +46,6 @@ typedef enum
 static const gchar DESKTOP_SCHEMA[] = "org.gnome.desktop.interface";
 static const gchar CLOCK_FORMAT[] = "clock-format";
 
-/**
- * gl_util_on_css_provider_parsing_error:
- * @provider: the provider that had a parsing error
- * @section: section the error happened in
- * @error: the parsing error
- * @user_data: user data set when the signal handler was connected
- *
- * Handle the GtkCssProvider::parsing-error signal and print a warning based on
- * @section and @error.
- */
-void
-gl_util_on_css_provider_parsing_error (GtkCssProvider *provider,
-                                       GtkCssSection *section,
-                                       GError *error,
-                                       G_GNUC_UNUSED gpointer user_data)
-{
-    g_critical ("Error while parsing CSS style (line: %u, character: %u): %s",
-                gtk_css_section_get_end_line (section) + 1,
-                gtk_css_section_get_end_position (section) + 1,
-                error->message);
-}
-
 /**
  * compare_timestamps:
  * @a: a date
diff --git a/src/gl-util.h b/src/gl-util.h
index 2cdcee8..ddd6a4d 100644
--- a/src/gl-util.h
+++ b/src/gl-util.h
@@ -51,10 +51,6 @@ typedef enum
     GL_JOURNAL_STORAGE_VOLATILE
 } GlJournalStorage;
 
-void gl_util_on_css_provider_parsing_error (GtkCssProvider *provider,
-                                            GtkCssSection *section,
-                                            GError *error,
-                                            G_GNUC_UNUSED gpointer user_data);
 gchar * gl_util_timestamp_to_display (guint64 microsecs,
                                       GDateTime *now,
                                       GlUtilClockFormat format,
diff --git a/src/gl-window.c b/src/gl-window.c
index c5f5e75..4d47eb7 100644
--- a/src/gl-window.c
+++ b/src/gl-window.c
@@ -459,9 +459,6 @@ gl_window_init (GlWindow *window)
                               G_CALLBACK (enable_export), window);
 
     provider = gtk_css_provider_new ();
-    g_signal_connect (provider, "parsing-error",
-                      G_CALLBACK (gl_util_on_css_provider_parsing_error),
-                      NULL);
     gtk_css_provider_load_from_resource (provider,
                                          "/org/gnome/Logs/gl-style.css");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]