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



commit a1858c5454cb6b0c1a5c3ab080aa7e6d64d0c06f
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 1f6c7a7..0134522 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2812,15 +2812,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]