forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
17e3d6f85e
commit
a1858c5454
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user