[gtk/wip/matthiasc/icon-theme: 6/12] Avoid a use of icon_file
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/icon-theme: 6/12] Avoid a use of icon_file
- Date: Fri, 18 Oct 2019 13:59:27 +0000 (UTC)
commit c3de5e36246bc82f8eab4afc840945d3c976e441
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 17 07:55:25 2019 -0500
Avoid a use of icon_file
This is a step towards getting rid of GtkIconInfo->icon_file.
gtk/gtkicontheme.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 7598f24d9f..cc7a6adddd 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3171,19 +3171,10 @@ gtk_icon_info_get_filename (GtkIconInfo *icon_info)
gboolean
gtk_icon_info_is_symbolic (GtkIconInfo *icon_info)
{
- gchar *icon_uri;
- gboolean is_symbolic;
-
g_return_val_if_fail (GTK_IS_ICON_INFO (icon_info), FALSE);
- icon_uri = NULL;
- if (icon_info->icon_file)
- icon_uri = g_file_get_uri (icon_info->icon_file);
-
- is_symbolic = (icon_uri != NULL) && (icon_uri_is_symbolic (icon_uri, -1));
- g_free (icon_uri);
-
- return is_symbolic;
+ return icon_info->filename != NULL &&
+ icon_uri_is_symbolic (icon_info->filename, -1);
}
/* If this returns TRUE, its safe to call icon_info_ensure_scale_and_texture
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]