icontheme: Remove gtk_icon_theme_rescan_if_needed()
authorBenjamin Otte <otte@redhat.com>
Sat, 1 Feb 2020 23:44:01 +0000 (00:44 +0100)
committerAlexander Larsson <alexl@redhat.com>
Tue, 4 Feb 2020 15:43:59 +0000 (16:43 +0100)
If the icon theme needs to be rescanned, it should just do it.
If it doesn't, there's no need for this function.

Ergo: Don't have the function.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkicontheme.c
gtk/gtkicontheme.h

index 90d7bf19a2d5ea8870449f7cbf5fa9dc7ec795bf..b476bcf5b263fcc5950fcbaa6b56cd674e4ba197 100644 (file)
@@ -5011,7 +5011,6 @@ gtk_icon_theme_choose_icon_finish
 gtk_icon_theme_lookup_by_gicon
 gtk_icon_theme_list_icons
 gtk_icon_theme_get_icon_sizes
-gtk_icon_theme_rescan_if_needed
 gtk_icon_get_base_size
 gtk_icon_get_base_scale
 gtk_icon_get_filename
index 91dc0e0eaff62f83012dafb7e9cb414a3c6148cb..f1c60285eef9d2e0c7a9d5f4c11a74a93ba18274 100644 (file)
@@ -2612,35 +2612,6 @@ rescan_themes (GtkIconTheme *self)
   return FALSE;
 }
 
-/**
- * gtk_icon_theme_rescan_if_needed:
- * @self: a #GtkIconTheme
- *
- * Checks to see if the icon theme has changed; if it has, any
- * currently cached information is discarded and will be reloaded
- * next time @self is accessed.
- *
- * Returns: %TRUE if the icon theme has changed and needed
- *     to be reloaded.
- */
-gboolean
-gtk_icon_theme_rescan_if_needed (GtkIconTheme *self)
-{
-  gboolean retval;
-
-  g_return_val_if_fail (GTK_IS_ICON_THEME (self), FALSE);
-
-  gtk_icon_theme_lock (self);
-
-  retval = rescan_themes (self);
-  if (retval)
-      do_theme_change (self);
-
-  gtk_icon_theme_unlock (self);
-
-  return retval;
-}
-
 static IconTheme *
 theme_new (const char *theme_name,
            GKeyFile   *theme_file)
index f1a01773bfa1a82c6e1ad8e6858abc14c6ba2048..442ff8c26c2e7d31f1480d7f48d05e7ef2bdd605 100644 (file)
@@ -149,8 +149,6 @@ GtkIcon *   gtk_icon_theme_lookup_by_gicon         (GtkIconTheme
 GDK_AVAILABLE_IN_ALL
 GList *       gtk_icon_theme_list_icons            (GtkIconTheme                *self,
                                                     const gchar                 *context);
-GDK_AVAILABLE_IN_ALL
-gboolean      gtk_icon_theme_rescan_if_needed      (GtkIconTheme                *self);
 
 
 GDK_AVAILABLE_IN_ALL