[gtk/wip/otte/icontheme: 4/9] icontheme: Remove gtk_icon_theme_rescan_if_needed()



commit a70a239968c9b7ea28d684811d43070b9de544d5
Author: Benjamin Otte <otte redhat com>
Date:   Sun Feb 2 00:44:01 2020 +0100

    icontheme: Remove gtk_icon_theme_rescan_if_needed()
    
    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 |  1 -
 gtk/gtkicontheme.c                   | 29 -----------------------------
 gtk/gtkicontheme.h                   |  2 --
 3 files changed, 32 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 90d7bf19a2..b476bcf5b2 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -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
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index c80c175c4d..ff04e11748 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -2643,35 +2643,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 void
 theme_destroy (IconTheme *theme)
 {
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h
index 8a785da879..0c12ff0809 100644
--- a/gtk/gtkicontheme.h
+++ b/gtk/gtkicontheme.h
@@ -153,8 +153,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


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