Skip to content

Commit 4adfaab

Browse files
committed
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)
1 parent 0c1ff16 commit 4adfaab

5 files changed

Lines changed: 185 additions & 1 deletion

File tree

src/Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,6 @@ test1 \
19771977
test_listlbr_utf8 \
19781978
test_mapping \
19791979
test_marks \
1980-
test_match_conceal \
19811980
test_nested_function \
19821981
test_options \
19831982
test_ruby \
@@ -2013,11 +2012,14 @@ test_arglist \
20132012
test_delete \
20142013
test_ex_undo \
20152014
test_expand \
2015+
test_expand_dllpath \
20162016
test_expr \
2017+
test_expr_utf8 \
20172018
test_feedkeys \
20182019
test_file_perm \
20192020
test_fnamemodify \
20202021
test_glob2regpat \
2022+
test_goto \
20212023
test_hardcopy \
20222024
test_help_tagjump \
20232025
test_history \
@@ -2026,8 +2028,11 @@ test_arglist \
20262028
test_json \
20272029
test_langmap \
20282030
test_lispwords \
2031+
test_matchadd_conceal \
2032+
test_matchadd_conceal_utf8 \
20292033
test_matchstrpos \
20302034
test_menu \
2035+
test_messages \
20312036
test_packadd \
20322037
test_partial \
20332038
test_perl \
@@ -2042,6 +2047,7 @@ test_arglist \
20422047
test_syn_attr \
20432048
test_syntax \
20442049
test_tabline \
2050+
test_tagjump \
20452051
test_timers \
20462052
test_undolevels \
20472053
test_unlet \
@@ -2350,12 +2356,18 @@ install-languages: languages $(DEST_LANG) $(DEST_KMAP)
23502356
ICON48PATH = $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
23512357
ICON32PATH = $(DESTDIR)$(DATADIR)/icons/locolor/32x32/apps
23522358
ICON16PATH = $(DESTDIR)$(DATADIR)/icons/locolor/16x16/apps
2359+
ICONTHEMEPATH = $(DATADIR)/icons/hicolor
23532360
DESKTOPPATH = $(DESTDIR)$(DATADIR)/applications
23542361
KDEPATH = $(HOME)/.kde/share/icons
23552362
install-icons:
23562363
if test -d $(ICON48PATH) -a -w $(ICON48PATH) \
23572364
-a ! -f $(ICON48PATH)/gvim.png; then \
23582365
$(INSTALL_DATA) $(SCRIPTSOURCE)/vim48x48.png $(ICON48PATH)/gvim.png; \
2366+
if test -z "$(DESTDIR)" -a -x $(GTK_UPDATE_ICON_CACHE) \
2367+
-a -w $(ICONTHEMEPATH) \
2368+
-a -f $(ICONTHEMEPATH)/index.theme; then \
2369+
$(GTK_UPDATE_ICON_CACHE) -q $(ICONTHEMEPATH); \
2370+
fi \
23592371
fi
23602372
if test -d $(ICON32PATH) -a -w $(ICON32PATH) \
23612373
-a ! -f $(ICON32PATH)/gvim.png; then \
@@ -2369,6 +2381,9 @@ install-icons:
23692381
$(INSTALL_DATA) $(SCRIPTSOURCE)/vim.desktop \
23702382
$(SCRIPTSOURCE)/gvim.desktop \
23712383
$(DESKTOPPATH); \
2384+
if test -z "$(DESTDIR)" -a -x $(UPDATE_DESKTOP_DATABASE); then \
2385+
$(UPDATE_DESKTOP_DATABASE) -q $(DESKTOPPATH); \
2386+
fi \
23722387
fi
23732388

23742389
$(HELPSOURCE)/vim.1 $(MACROSOURCE) $(TOOLSSOURCE):

src/auto/configure

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,8 @@ NARROW_PROTO
638638
MOTIF_LIBNAME
639639
GRESOURCE_OBJ
640640
GRESOURCE_SRC
641+
UPDATE_DESKTOP_DATABASE
642+
GTK_UPDATE_ICON_CACHE
641643
GLIB_COMPILE_RESOURCES
642644
GNOME_INCLUDEDIR
643645
GNOME_LIBDIR
@@ -828,6 +830,8 @@ enable_gtktest
828830
with_gnome_includes
829831
with_gnome_libs
830832
with_gnome
833+
enable_icon_cache_update
834+
enable_desktop_database_update
831835
with_motif_lib
832836
with_tlib
833837
enable_largefile
@@ -1488,6 +1492,8 @@ Optional Features:
14881492
--enable-nextaw-check If auto-select GUI, check for neXtaw default=yes
14891493
--enable-carbon-check If auto-select GUI, check for Carbon default=yes
14901494
--disable-gtktest Do not try to compile and run a test GTK program
1495+
--disable-icon-cache-update update disabled
1496+
--disable-desktop-database-update update disabled
14911497
--disable-largefile omit support for large files
14921498
--disable-acl Don't check for ACL support.
14931499
--disable-gpm Don't use gpm (Linux mouse daemon).
@@ -9351,8 +9357,134 @@ $as_echo "not usable." >&6; }
93519357
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
93529358
$as_echo "cannot obtain from pkg_config." >&6; }
93539359
fi
9360+
9361+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
9362+
$as_echo_n "checking --disable-icon-cache-update argument... " >&6; }
9363+
# Check whether --enable-icon_cache_update was given.
9364+
if test "${enable_icon_cache_update+set}" = set; then :
9365+
enableval=$enable_icon_cache_update;
9366+
else
9367+
enable_icon_cache_update="yes"
9368+
fi
9369+
9370+
if test "$enable_icon_cache_update" = "yes"; then
9371+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
9372+
$as_echo "not set" >&6; }
9373+
# Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
9374+
set dummy gtk-update-icon-cache; ac_word=$2
9375+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9376+
$as_echo_n "checking for $ac_word... " >&6; }
9377+
if ${ac_cv_path_GTK_UPDATE_ICON_CACHE+:} false; then :
9378+
$as_echo_n "(cached) " >&6
9379+
else
9380+
case $GTK_UPDATE_ICON_CACHE in
9381+
[\\/]* | ?:[\\/]*)
9382+
ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
9383+
;;
9384+
*)
9385+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9386+
for as_dir in $PATH
9387+
do
9388+
IFS=$as_save_IFS
9389+
test -z "$as_dir" && as_dir=.
9390+
for ac_exec_ext in '' $ac_executable_extensions; do
9391+
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9392+
ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir/$ac_word$ac_exec_ext"
9393+
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9394+
break 2
9395+
fi
9396+
done
9397+
done
9398+
IFS=$as_save_IFS
9399+
9400+
test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
9401+
;;
9402+
esac
9403+
fi
9404+
GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
9405+
if test -n "$GTK_UPDATE_ICON_CACHE"; then
9406+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
9407+
$as_echo "$GTK_UPDATE_ICON_CACHE" >&6; }
9408+
else
9409+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410+
$as_echo "no" >&6; }
9411+
fi
9412+
9413+
9414+
if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
9415+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
9416+
$as_echo "not found in PATH." >&6; }
9417+
fi
9418+
else
9419+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
9420+
$as_echo "update disabled" >&6; }
9421+
fi
9422+
9423+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
9424+
$as_echo_n "checking --disable-desktop-database-update argument... " >&6; }
9425+
# Check whether --enable-desktop_database_update was given.
9426+
if test "${enable_desktop_database_update+set}" = set; then :
9427+
enableval=$enable_desktop_database_update;
9428+
else
9429+
enable_desktop_database_update="yes"
93549430
fi
93559431

9432+
if test "$enable_desktop_database_update" = "yes"; then
9433+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
9434+
$as_echo "not set" >&6; }
9435+
# Extract the first word of "update-desktop-database", so it can be a program name with args.
9436+
set dummy update-desktop-database; ac_word=$2
9437+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9438+
$as_echo_n "checking for $ac_word... " >&6; }
9439+
if ${ac_cv_path_UPDATE_DESKTOP_DATABASE+:} false; then :
9440+
$as_echo_n "(cached) " >&6
9441+
else
9442+
case $UPDATE_DESKTOP_DATABASE in
9443+
[\\/]* | ?:[\\/]*)
9444+
ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
9445+
;;
9446+
*)
9447+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9448+
for as_dir in $PATH
9449+
do
9450+
IFS=$as_save_IFS
9451+
test -z "$as_dir" && as_dir=.
9452+
for ac_exec_ext in '' $ac_executable_extensions; do
9453+
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9454+
ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext"
9455+
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9456+
break 2
9457+
fi
9458+
done
9459+
done
9460+
IFS=$as_save_IFS
9461+
9462+
test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
9463+
;;
9464+
esac
9465+
fi
9466+
UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
9467+
if test -n "$UPDATE_DESKTOP_DATABASE"; then
9468+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
9469+
$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; }
9470+
else
9471+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9472+
$as_echo "no" >&6; }
9473+
fi
9474+
9475+
9476+
if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
9477+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
9478+
$as_echo "not found in PATH." >&6; }
9479+
fi
9480+
else
9481+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
9482+
$as_echo "update disabled" >&6; }
9483+
fi
9484+
fi
9485+
9486+
9487+
93569488

93579489

93589490

src/config.mk.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
162162
GRESOURCE_SRC = @GRESOURCE_SRC@
163163
GRESOURCE_OBJ = @GRESOURCE_OBJ@
164164

165+
GTK_UPDATE_ICON_CACHE = @GTK_UPDATE_ICON_CACHE@
166+
UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@
167+
165168
### Any OS dependent extra source and object file
166169
OS_EXTRA_SRC = @OS_EXTRA_SRC@
167170
OS_EXTRA_OBJ = @OS_EXTRA_OBJ@

src/configure.in

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2688,10 +2688,42 @@ if test "x$GUITYPE" = "xGTK"; then
26882688
else
26892689
AC_MSG_RESULT([cannot obtain from pkg_config.])
26902690
fi
2691+
2692+
AC_MSG_CHECKING([--disable-icon-cache-update argument])
2693+
AC_ARG_ENABLE(icon_cache_update,
2694+
[ --disable-icon-cache-update update disabled],
2695+
[],
2696+
[enable_icon_cache_update="yes"])
2697+
if test "$enable_icon_cache_update" = "yes"; then
2698+
AC_MSG_RESULT([not set])
2699+
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE,[gtk-update-icon-cache],no)
2700+
if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
2701+
AC_MSG_RESULT([not found in PATH.])
2702+
fi
2703+
else
2704+
AC_MSG_RESULT([update disabled])
2705+
fi
2706+
2707+
AC_MSG_CHECKING([--disable-desktop-database-update argument])
2708+
AC_ARG_ENABLE(desktop_database_update,
2709+
[ --disable-desktop-database-update update disabled],
2710+
[],
2711+
[enable_desktop_database_update="yes"])
2712+
if test "$enable_desktop_database_update" = "yes"; then
2713+
AC_MSG_RESULT([not set])
2714+
AC_PATH_PROG(UPDATE_DESKTOP_DATABASE,[update-desktop-database],no)
2715+
if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
2716+
AC_MSG_RESULT([not found in PATH.])
2717+
fi
2718+
else
2719+
AC_MSG_RESULT([update disabled])
2720+
fi
26912721
fi
26922722
AC_SUBST(GLIB_COMPILE_RESOURCES)
26932723
AC_SUBST(GRESOURCE_SRC)
26942724
AC_SUBST(GRESOURCE_OBJ)
2725+
AC_SUBST(GTK_UPDATE_ICON_CACHE)
2726+
AC_SUBST(UPDATE_DESKTOP_DATABASE)
26952727

26962728
dnl Check for Motif include files location.
26972729
dnl The LAST one found is used, this makes the highest version to be used,

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1767,
751753
/**/
752754
1766,
753755
/**/

0 commit comments

Comments
 (0)