[balsa] Restore updating the icon cache



commit 6642a029bdd561e8599e723bffc6e1669b0c7786
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Apr 27 19:55:57 2017 -0400

    Restore updating the icon cache
    
        * configure.ac: find the path to gtk-update-icon-cache.
        * images/Makefile.am: re-enable updating the cache.
        * libbalsa/files.c (libbalsa_icon_finder): do not redundantly
          append BALSA_DATA_PREFIX "/hicolor/48x48/mimetypes" to the
          default icon theme search path.

 ChangeLog          |   10 ++++++++++
 configure.ac       |    1 +
 images/Makefile.am |   14 ++++++--------
 libbalsa/files.c   |    8 --------
 4 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3f52bed..68e67c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-04-27  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       Restore updating the icon cache, and remove a redundant action
+
+       * configure.ac: find the path to gtk-update-icon-cache.
+       * images/Makefile.am: re-enable updating the cache.
+       * libbalsa/files.c (libbalsa_icon_finder): do not redundantly
+         append BALSA_DATA_PREFIX "/hicolor/48x48/mimetypes" to the
+         default icon theme search path.
+
 2017-04-26  Peter Bloomfield  <pbloomfield bellsouth net>
 
        * src/balsa-icons.c: disable debug output, left enabled by
diff --git a/configure.ac b/configure.ac
index 5b5385f..6a44bce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -798,6 +798,7 @@ fi
 BALSA_DATA_PREFIX="${datadir}/balsa"
 AC_SUBST(BALSA_DATA_PREFIX)
 CPPFLAGS="$CPPFLAGS -DBALSA_DATA_PREFIX=\\\"${BALSA_DATA_PREFIX}\\\""
+AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
 
 dnl Documentation and Testing requirements for libnetclient
 
diff --git a/images/Makefile.am b/images/Makefile.am
index 69aa69a..75621e4 100644
--- a/images/Makefile.am
+++ b/images/Makefile.am
@@ -14,11 +14,9 @@ balsabitmapsdir = $(BALSA_DATA_PREFIX)/pixmaps
 
 balsabitmaps_DATA = $(balsa_IMGS)
 
-# the call to $(GTK_UPDATE_ICON_CACHE) updates the icon cache for the
-# icons installed in $(SUBDIRS) (Gtk+-2.6) but this breaks lots of
-# stuff: user builds, package creations, so we disable it for now.
-#install-data-hook:
-#      if test -x "$(GTK_UPDATE_ICON_CACHE)" ; then                    \
-#              $(GTK_UPDATE_ICON_CACHE) $(DESTDIR)$(BALSA_DATA_PREFIX)/hicolor ; \
-#              $(GTK_UPDATE_ICON_CACHE) $(DESTDIR)$(HICOLOR_ICON_DIR) ;          \
-#      fi
+install-data-hook:
+       if test -x "$(GTK_UPDATE_ICON_CACHE)" ; then    \
+           $(GTK_UPDATE_ICON_CACHE)                    \
+               --ignore-theme-index                    \
+               $(BALSA_DATA_PREFIX) ;                  \
+       fi
diff --git a/libbalsa/files.c b/libbalsa/files.c
index dbb800a..07f39ae 100644
--- a/libbalsa/files.c
+++ b/libbalsa/files.c
@@ -153,14 +153,6 @@ libbalsa_icon_finder(GtkWidget         * widget,
         if (G_IS_THEMED_ICON(icon)) {
             gint i;
             GStrv icon_names;
-            static gsize appended = 0;
-
-            if (g_once_init_enter(&appended)) {
-                gtk_icon_theme_append_search_path(icon_theme,
-                                                  BALSA_DATA_PREFIX
-                                                  "/hicolor/48x48/mimetypes");
-                g_once_init_leave(&appended, 1);
-            }
 
             g_object_get(G_OBJECT(icon), "names", &icon_names, NULL);
 


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