[gtk+/parser] cssprovider: When loading themes, don't pass in an error



commit de7103e40f3872244758971ab4946ca6bc8deec9
Author: Benjamin Otte <otte redhat com>
Date:   Wed May 18 18:37:23 2011 +0200

    cssprovider: When loading themes, don't pass in an error
    
    We want to parse existing themes as well as possible instead of failing.
    And the g_warning() is preserved.

 gtk/gtkcssprovider.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index a27bd0f..5ef4100 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2809,15 +2809,10 @@ gtk_css_provider_get_named (const gchar *name,
 
       if (path)
         {
-          GError *error;
-
           provider = gtk_css_provider_new ();
-          error = NULL;
-          if (!gtk_css_provider_load_from_path (provider, path, &error))
-            {
-              g_warning ("Could not load named theme \"%s\": %s", name, error->message);
-              g_error_free (error);
 
+          if (!gtk_css_provider_load_from_path (provider, path, NULL))
+            {
               g_object_unref (provider);
               provider = NULL;
             }



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