[gtk+] Rename gtkiconcachevalidator.h



commit fe142b10bf365790c76aac11bb773902f6f92d1f
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Feb 1 16:01:38 2018 +0100

    Rename gtkiconcachevalidator.h
    
    Follow the same convention for private headers as newer parts of GTK.

 gtk/gtkiconcache.c                                 |    2 +-
 gtk/gtkiconcachevalidator.c                        |    6 +++---
 ...evalidator.h => gtkiconcachevalidatorprivate.h} |    9 ++++-----
 gtk/meson.build                                    |    2 +-
 gtk/updateiconcache.c                              |    9 ++-------
 5 files changed, 11 insertions(+), 17 deletions(-)
---
diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c
index d440789..54cdbfd 100644
--- a/gtk/gtkiconcache.c
+++ b/gtk/gtkiconcache.c
@@ -19,7 +19,7 @@
 
 #include "gtkdebug.h"
 #include "gtkiconcacheprivate.h"
-#include "gtkiconcachevalidator.h"
+#include "gtkiconcachevalidatorprivate.h"
 
 #include <glib/gstdio.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
diff --git a/gtk/gtkiconcachevalidator.c b/gtk/gtkiconcachevalidator.c
index 118eae0..7ad1c10 100644
--- a/gtk/gtkiconcachevalidator.c
+++ b/gtk/gtkiconcachevalidator.c
@@ -15,7 +15,7 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 #include "config.h"
-#include "gtkiconcachevalidator.h"
+#include "gtkiconcachevalidatorprivate.h"
 
 #include <glib.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
@@ -369,7 +369,7 @@ check_hash (CacheInfo *info,
 }
 
 /**
- * _gtk_icon_cache_validate:
+ * gtk_icon_cache_validate:
  * @info: a CacheInfo structure
  *
  * Validates the icon cache passed in the @cache and
@@ -383,7 +383,7 @@ check_hash (CacheInfo *info,
  * Returns: %TRUE if the cache is valid
  */
 gboolean
-_gtk_icon_cache_validate (CacheInfo *info)
+gtk_icon_cache_validate (CacheInfo *info)
 {
   guint32 hash_offset;
   guint32 directory_list_offset;
diff --git a/gtk/gtkiconcachevalidator.h b/gtk/gtkiconcachevalidatorprivate.h
similarity index 83%
rename from gtk/gtkiconcachevalidator.h
rename to gtk/gtkiconcachevalidatorprivate.h
index 5c59cf2..c5e1e33 100644
--- a/gtk/gtkiconcachevalidator.h
+++ b/gtk/gtkiconcachevalidatorprivate.h
@@ -14,9 +14,8 @@
  * You should have received a copy of the GNU Library General Public
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __GTK_ICON_CACHE_VALIDATOR_H__
-#define __GTK_ICON_CACHE_VALIDATOR_H__
-
+#ifndef __GTK_ICON_CACHE_VALIDATOR_PRIVATE_H__
+#define __GTK_ICON_CACHE_VALIDATOR_PRIVATE_H__
 
 #include <glib.h>
 
@@ -35,8 +34,8 @@ typedef struct {
   gint flags;
 } CacheInfo;
 
-gboolean _gtk_icon_cache_validate (CacheInfo *info);
+gboolean gtk_icon_cache_validate (CacheInfo *info);
 
 G_END_DECLS
 
-#endif  /* __GTK_ICON_CACHE_VALIDATOR_H__ */
+#endif  /* __GTK_ICON_CACHE_VALIDATOR_PRIVATE_H__ */
diff --git a/gtk/meson.build b/gtk/meson.build
index ff6ebe7..cb450e2 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -1038,7 +1038,7 @@ libgtk_dep = declare_dependency(sources: gtk_dep_sources,
 gtk_tools = [
   ['gtk4-query-settings', ['gtk-query-settings.c']],
   ['gtk4-builder-tool', ['gtk-builder-tool.c']],
-  ['gtk4-update-icon-cache', ['updateiconcache.c']],
+  ['gtk4-update-icon-cache', ['updateiconcache.c', 'gtkiconcachevalidator.c']],
   ['gtk4-encode-symbolic-svg', ['encodesymbolic.c', 'gdkpixbufutils.c']],
   ['gtk4-query-immodules', ['queryimmodules.c', 'gtkutils.c']],
 ]
diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c
index fe2eb8f..92f0924 100644
--- a/gtk/updateiconcache.c
+++ b/gtk/updateiconcache.c
@@ -39,7 +39,7 @@
 #include <glib/gstdio.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
 #include <glib/gi18n.h>
-#include "gtkiconcachevalidator.h"
+#include "gtkiconcachevalidatorprivate.h"
 
 static gboolean force_update = FALSE;
 static gboolean ignore_theme_index = FALSE;
@@ -48,11 +48,6 @@ static gboolean index_only = TRUE;
 static gboolean validate = FALSE;
 static gchar *var_name = (gchar *) "-";
 
-/* Quite ugly - if we just add the c file to the
- * list of sources in Makefile.am, libtool complains.
- */
-#include "gtkiconcachevalidator.c"
-
 #define CACHE_NAME "icon-theme.cache"
 
 #define HAS_SUFFIX_XPM (1 << 0)
@@ -1427,7 +1422,7 @@ validate_file (const gchar *file)
   info.n_directories = 0;
   info.flags = CHECK_OFFSETS|CHECK_STRINGS|CHECK_PIXBUFS;
 
-  if (!_gtk_icon_cache_validate (&info))
+  if (!gtk_icon_cache_validate (&info))
     {
       g_mapped_file_unref (map);
       return FALSE;


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