diff src/gui_gtk_x11.c @ 7380:055a0b587a3e v7.4.995

commit https://github.com/vim/vim/commit/36e294c00c784b9ddd05a4fdbea2e331ab2b1ca8 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 29 18:55:46 2015 +0100 patch 7.4.995 Problem: gdk_pixbuf_new_from_inline() is deprecated. Solution: Generate auto/gui_gtk_gresources.c. (Kazunobu Kazunobu, closes https://github.com/vim/vim/issues/507)
author Christian Brabandt <cb@256bit.org>
date Tue, 29 Dec 2015 19:00:05 +0100
parents 8ba562cb3e07
children 15eefe1b0dad
line wrap: on
line diff
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -22,6 +22,9 @@
  */
 
 #include "vim.h"
+#ifdef USE_GRESOURCE
+#include "auto/gui_gtk_gresources.h"
+#endif
 
 #ifdef FEAT_GUI_GNOME
 /* Gnome redefines _() and N_().  Grrr... */
@@ -1434,6 +1437,9 @@ gui_mch_early_init_check(void)
 	EMSG(_((char *)e_opendisp));
 	return FAIL;
     }
+#ifdef USE_GRESOURCE
+    gui_gtk_register_resource();
+#endif
     return OK;
 }
 
@@ -3620,6 +3626,9 @@ mainwin_destroy_cb(GtkObject *object UNU
 		IOSIZE - 1);
 	preserve_exit();
     }
+#ifdef USE_GRESOURCE
+    gui_gtk_unregister_resource();
+#endif
 }