[gtk/wip/otte/for-master: 1/2] icontheme: Remove unused parameter



commit 4be479931666b65a615830d81d739894b5741076
Author: Benjamin Otte <otte redhat com>
Date:   Thu Mar 5 07:56:01 2020 +0100

    icontheme: Remove unused parameter
    
    It's only ever set to NULL (and then dereferenced, too)

 gtk/gtkicontheme.c | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 569e500f13..3fe8326123 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -2123,8 +2123,7 @@ real_choose_icon (GtkIconTheme      *self,
                   gint               size,
                   gint               scale,
                   GtkIconLookupFlags flags,
-                  gboolean           non_blocking,
-                  gboolean           *would_block)
+                  gboolean           non_blocking)
 {
   GList *l;
   GtkIconPaintable *icon = NULL;
@@ -2135,10 +2134,7 @@ real_choose_icon (GtkIconTheme      *self,
   IconKey key;
 
   if (!ensure_valid_themes (self, non_blocking))
-    {
-      *would_block = TRUE;
-      return NULL;
-    }
+    return NULL;
 
   key.icon_names = (gchar **)icon_names;
   key.size = size;
@@ -2282,8 +2278,7 @@ choose_icon (GtkIconTheme      *self,
              gint               scale,
              GtkTextDirection   direction,
              GtkIconLookupFlags flags,
-             gboolean           non_blocking,
-             gboolean           *would_block)
+             gboolean           non_blocking)
 {
   gboolean has_regular = FALSE, has_symbolic = FALSE;
   GtkIconPaintable *icon;
@@ -2338,7 +2333,7 @@ choose_icon (GtkIconTheme      *self,
                                size,
                                scale,
                                flags & ~(GTK_ICON_LOOKUP_FORCE_REGULAR | GTK_ICON_LOOKUP_FORCE_SYMBOLIC),
-                               non_blocking, would_block);
+                               non_blocking);
 
       g_ptr_array_free (new_names, TRUE);
     }
@@ -2364,7 +2359,7 @@ choose_icon (GtkIconTheme      *self,
                                size,
                                scale,
                                flags & ~(GTK_ICON_LOOKUP_FORCE_REGULAR | GTK_ICON_LOOKUP_FORCE_SYMBOLIC),
-                               non_blocking, would_block);
+                               non_blocking);
 
       g_ptr_array_free (new_names, TRUE);
     }
@@ -2382,7 +2377,7 @@ choose_icon (GtkIconTheme      *self,
                                size,
                                scale,
                                flags & ~(GTK_ICON_LOOKUP_FORCE_REGULAR | GTK_ICON_LOOKUP_FORCE_SYMBOLIC),
-                               non_blocking, would_block);
+                               non_blocking);
 
       g_ptr_array_free (new_names, TRUE);
     }
@@ -2393,7 +2388,7 @@ choose_icon (GtkIconTheme      *self,
                                size,
                                scale,
                                flags & ~(GTK_ICON_LOOKUP_FORCE_REGULAR | GTK_ICON_LOOKUP_FORCE_SYMBOLIC),
-                               non_blocking, would_block);
+                               non_blocking);
     }
 
   return icon;
@@ -2470,7 +2465,7 @@ gtk_icon_theme_lookup_icon (GtkIconTheme       *self,
       memcpy (&names[1], fallbacks, sizeof (char *) * n_fallbacks);
       names[n_fallbacks + 1] = NULL;
 
-      icon = choose_icon (self, names, size, scale, direction, flags, FALSE, NULL);
+      icon = choose_icon (self, names, size, scale, direction, flags, FALSE);
 
       g_free (names);
     }
@@ -2481,7 +2476,7 @@ gtk_icon_theme_lookup_icon (GtkIconTheme       *self,
       names[0] = icon_name;
       names[1] = NULL;
 
-      icon = choose_icon (self, names, size, scale, direction, flags, FALSE, NULL);
+      icon = choose_icon (self, names, size, scale, direction, flags, FALSE);
     }
 
   gtk_icon_theme_unlock (self);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]