[gtk+] cssprovider: Remove another path that can't be reached
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssprovider: Remove another path that can't be reached
- Date: Wed, 19 Sep 2012 13:34:50 +0000 (UTC)
commit 6696aa2128e37fa0c1866ad7667bcb11c5cc3e78
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 19 15:32:38 2012 +0200
cssprovider: Remove another path that can't be reached
... because the return value of a function is always TRUE.
gtk/gtkcssprovider.c | 21 +++++----------------
1 files changed, 5 insertions(+), 16 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index cdeb00b..d6f5d2b 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2848,22 +2848,11 @@ gtk_css_provider_get_named (const gchar *name,
if (resource != NULL)
g_resources_register (resource);
- if (!gtk_css_provider_load_from_path (provider, path, NULL))
- {
- if (resource != NULL)
- {
- g_resources_unregister (resource);
- g_resource_unref (resource);
- }
- g_object_unref (provider);
- provider = NULL;
- }
- else
- {
- /* Only set this after load success, as load_from_path will clear it */
- provider->priv->resource = resource;
- g_hash_table_insert (themes, g_strdup (key), provider);
- }
+ gtk_css_provider_load_from_path (provider, path, NULL);
+
+ /* Only set this after load, as load_from_path will clear it */
+ provider->priv->resource = resource;
+ g_hash_table_insert (themes, g_strdup (key), provider);
g_free (path);
g_free (dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]