Mercurial > vim
changeset 7679:c80284cfe1b8 v7.4.1138
commit https://github.com/vim/vim/commit/3a466a87180d677b898687ef72d09f14a397794e
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 19 17:47:25 2016 +0100
patch 7.4.1138
Problem: When running gvim in the foreground some icons are missing.
(Taylor Venable)
Solution: Move the call to gui_gtk_register_resource(). (Kazunobu Kuriyama)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Jan 2016 18:00:06 +0100 |
parents | 186ca15645b1 |
children | 4b72a6f11547 |
files | src/gui_gtk_x11.c src/version.c |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -1437,9 +1437,6 @@ gui_mch_early_init_check(void) EMSG(_((char *)e_opendisp)); return FAIL; } -#ifdef USE_GRESOURCE - gui_gtk_register_resource(); -#endif return OK; } @@ -1451,6 +1448,18 @@ gui_mch_early_init_check(void) int gui_mch_init_check(void) { +#ifdef USE_GRESOURCE + static int res_registered = FALSE; + + if (!res_registered) + { + /* Call this function in the GUI process; otherwise, the resources + * won't be available. Don't call it twice. */ + res_registered = TRUE; + gui_gtk_register_resource(); + } +#endif + #ifdef FEAT_GUI_GNOME if (gtk_socket_id == 0) using_gnome = 1;