[gtk] Revert "icon theme: Avoid a string copy"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] Revert "icon theme: Avoid a string copy"
- Date: Thu, 17 Oct 2019 12:17:06 +0000 (UTC)
commit 8a603ff5bd320c284961f0b622faf6763e2d3afc
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 17 07:15:30 2019 -0500
Revert "icon theme: Avoid a string copy"
This reverts commit 0895f0211e535ac0bdf7e461bb0e046bdee60c4d.
This negatively affected icons that are included as
resources, since peek_path returns NULL for them.
gtk/gtkicontheme.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index e44b953017..ee7f7c49bb 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3276,16 +3276,17 @@ gtk_icon_info_get_filename (GtkIconInfo *icon_info)
gboolean
gtk_icon_info_is_symbolic (GtkIconInfo *icon_info)
{
- const char *path;
+ gchar *icon_uri;
gboolean is_symbolic;
g_return_val_if_fail (GTK_IS_ICON_INFO (icon_info), FALSE);
- path = NULL;
+ icon_uri = NULL;
if (icon_info->icon_file)
- path = g_file_peek_path (icon_info->icon_file);
+ icon_uri = g_file_get_uri (icon_info->icon_file);
- is_symbolic = (path != NULL) && (icon_uri_is_symbolic (path, -1));
+ is_symbolic = (icon_uri != NULL) && (icon_uri_is_symbolic (icon_uri, -1));
+ g_free (icon_uri);
return is_symbolic;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]