[gtk/wip/otte/icontheme: 18/26] icontheme: Remove gtk_icon_theme_rescan_if_needed()



commit 48b97919890134748a83afbeac71929d7ab57330
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 91dc0e0eaf..f1c60285ee 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -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)
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h
index f1a01773bf..442ff8c26c 100644
--- a/gtk/gtkicontheme.h
+++ b/gtk/gtkicontheme.h
@@ -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


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