# HG changeset patch # User Christian Brabandt # Date 1461256207 -7200 # Node ID 53e53aeb35ad256f1b3308da6fa3ed999f32ec5a # Parent b4be6f6610a070274425906d896ea9c44425c731 commit https://github.com/vim/vim/commit/4adfaabfe7e07da9546b45130cad0d266ba48611 Author: Bram Moolenaar Date: Thu Apr 21 18:20:11 2016 +0200 patch 7.4.1767 Problem: When installing Vim on a GTK system the icon cache is not updated. Solution: Update the GTK icon cache when possible. (Kazunobu Kuriyama) diff --git a/src/Makefile b/src/Makefile --- a/src/Makefile +++ b/src/Makefile @@ -1977,7 +1977,6 @@ test1 \ test_listlbr_utf8 \ test_mapping \ test_marks \ - test_match_conceal \ test_nested_function \ test_options \ test_ruby \ @@ -2013,11 +2012,14 @@ test_arglist \ test_delete \ test_ex_undo \ test_expand \ + test_expand_dllpath \ test_expr \ + test_expr_utf8 \ test_feedkeys \ test_file_perm \ test_fnamemodify \ test_glob2regpat \ + test_goto \ test_hardcopy \ test_help_tagjump \ test_history \ @@ -2026,8 +2028,11 @@ test_arglist \ test_json \ test_langmap \ test_lispwords \ + test_matchadd_conceal \ + test_matchadd_conceal_utf8 \ test_matchstrpos \ test_menu \ + test_messages \ test_packadd \ test_partial \ test_perl \ @@ -2042,6 +2047,7 @@ test_arglist \ test_syn_attr \ test_syntax \ test_tabline \ + test_tagjump \ test_timers \ test_undolevels \ test_unlet \ @@ -2350,12 +2356,18 @@ install-languages: languages $(DEST_LANG ICON48PATH = $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps ICON32PATH = $(DESTDIR)$(DATADIR)/icons/locolor/32x32/apps ICON16PATH = $(DESTDIR)$(DATADIR)/icons/locolor/16x16/apps +ICONTHEMEPATH = $(DATADIR)/icons/hicolor DESKTOPPATH = $(DESTDIR)$(DATADIR)/applications KDEPATH = $(HOME)/.kde/share/icons install-icons: if test -d $(ICON48PATH) -a -w $(ICON48PATH) \ -a ! -f $(ICON48PATH)/gvim.png; then \ $(INSTALL_DATA) $(SCRIPTSOURCE)/vim48x48.png $(ICON48PATH)/gvim.png; \ + if test -z "$(DESTDIR)" -a -x $(GTK_UPDATE_ICON_CACHE) \ + -a -w $(ICONTHEMEPATH) \ + -a -f $(ICONTHEMEPATH)/index.theme; then \ + $(GTK_UPDATE_ICON_CACHE) -q $(ICONTHEMEPATH); \ + fi \ fi if test -d $(ICON32PATH) -a -w $(ICON32PATH) \ -a ! -f $(ICON32PATH)/gvim.png; then \ @@ -2369,6 +2381,9 @@ install-icons: $(INSTALL_DATA) $(SCRIPTSOURCE)/vim.desktop \ $(SCRIPTSOURCE)/gvim.desktop \ $(DESKTOPPATH); \ + if test -z "$(DESTDIR)" -a -x $(UPDATE_DESKTOP_DATABASE); then \ + $(UPDATE_DESKTOP_DATABASE) -q $(DESKTOPPATH); \ + fi \ fi $(HELPSOURCE)/vim.1 $(MACROSOURCE) $(TOOLSSOURCE): diff --git a/src/auto/configure b/src/auto/configure --- a/src/auto/configure +++ b/src/auto/configure @@ -638,6 +638,8 @@ NARROW_PROTO MOTIF_LIBNAME GRESOURCE_OBJ GRESOURCE_SRC +UPDATE_DESKTOP_DATABASE +GTK_UPDATE_ICON_CACHE GLIB_COMPILE_RESOURCES GNOME_INCLUDEDIR GNOME_LIBDIR @@ -828,6 +830,8 @@ enable_gtktest with_gnome_includes with_gnome_libs with_gnome +enable_icon_cache_update +enable_desktop_database_update with_motif_lib with_tlib enable_largefile @@ -1488,6 +1492,8 @@ Optional Features: --enable-nextaw-check If auto-select GUI, check for neXtaw default=yes --enable-carbon-check If auto-select GUI, check for Carbon default=yes --disable-gtktest Do not try to compile and run a test GTK program + --disable-icon-cache-update update disabled + --disable-desktop-database-update update disabled --disable-largefile omit support for large files --disable-acl Don't check for ACL support. --disable-gpm Don't use gpm (Linux mouse daemon). @@ -9351,7 +9357,133 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5 $as_echo "cannot obtain from pkg_config." >&6; } fi -fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5 +$as_echo_n "checking --disable-icon-cache-update argument... " >&6; } + # Check whether --enable-icon_cache_update was given. +if test "${enable_icon_cache_update+set}" = set; then : + enableval=$enable_icon_cache_update; +else + enable_icon_cache_update="yes" +fi + + if test "$enable_icon_cache_update" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 +$as_echo "not set" >&6; } + # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args. +set dummy gtk-update-icon-cache; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GTK_UPDATE_ICON_CACHE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GTK_UPDATE_ICON_CACHE in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no" + ;; +esac +fi +GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE +if test -n "$GTK_UPDATE_ICON_CACHE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5 +$as_echo "$GTK_UPDATE_ICON_CACHE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5 +$as_echo "not found in PATH." >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5 +$as_echo "update disabled" >&6; } + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5 +$as_echo_n "checking --disable-desktop-database-update argument... " >&6; } + # Check whether --enable-desktop_database_update was given. +if test "${enable_desktop_database_update+set}" = set; then : + enableval=$enable_desktop_database_update; +else + enable_desktop_database_update="yes" +fi + + if test "$enable_desktop_database_update" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 +$as_echo "not set" >&6; } + # Extract the first word of "update-desktop-database", so it can be a program name with args. +set dummy update-desktop-database; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_UPDATE_DESKTOP_DATABASE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $UPDATE_DESKTOP_DATABASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no" + ;; +esac +fi +UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE +if test -n "$UPDATE_DESKTOP_DATABASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5 +$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5 +$as_echo "not found in PATH." >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5 +$as_echo "update disabled" >&6; } + fi +fi + + diff --git a/src/config.mk.in b/src/config.mk.in --- a/src/config.mk.in +++ b/src/config.mk.in @@ -162,6 +162,9 @@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_R GRESOURCE_SRC = @GRESOURCE_SRC@ GRESOURCE_OBJ = @GRESOURCE_OBJ@ +GTK_UPDATE_ICON_CACHE = @GTK_UPDATE_ICON_CACHE@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ + ### Any OS dependent extra source and object file OS_EXTRA_SRC = @OS_EXTRA_SRC@ OS_EXTRA_OBJ = @OS_EXTRA_OBJ@ diff --git a/src/configure.in b/src/configure.in --- a/src/configure.in +++ b/src/configure.in @@ -2688,10 +2688,42 @@ if test "x$GUITYPE" = "xGTK"; then else AC_MSG_RESULT([cannot obtain from pkg_config.]) fi + + AC_MSG_CHECKING([--disable-icon-cache-update argument]) + AC_ARG_ENABLE(icon_cache_update, + [ --disable-icon-cache-update update disabled], + [], + [enable_icon_cache_update="yes"]) + if test "$enable_icon_cache_update" = "yes"; then + AC_MSG_RESULT([not set]) + AC_PATH_PROG(GTK_UPDATE_ICON_CACHE,[gtk-update-icon-cache],no) + if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then + AC_MSG_RESULT([not found in PATH.]) + fi + else + AC_MSG_RESULT([update disabled]) + fi + + AC_MSG_CHECKING([--disable-desktop-database-update argument]) + AC_ARG_ENABLE(desktop_database_update, + [ --disable-desktop-database-update update disabled], + [], + [enable_desktop_database_update="yes"]) + if test "$enable_desktop_database_update" = "yes"; then + AC_MSG_RESULT([not set]) + AC_PATH_PROG(UPDATE_DESKTOP_DATABASE,[update-desktop-database],no) + if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then + AC_MSG_RESULT([not found in PATH.]) + fi + else + AC_MSG_RESULT([update disabled]) + fi fi AC_SUBST(GLIB_COMPILE_RESOURCES) AC_SUBST(GRESOURCE_SRC) AC_SUBST(GRESOURCE_OBJ) +AC_SUBST(GTK_UPDATE_ICON_CACHE) +AC_SUBST(UPDATE_DESKTOP_DATABASE) dnl Check for Motif include files location. dnl The LAST one found is used, this makes the highest version to be used, diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1767, +/**/ 1766, /**/ 1765,