Karsten Hopp 0b432d
To: vim-dev@vim.org
Karsten Hopp 0b432d
Subject: Patch 7.0.072
Karsten Hopp 0b432d
Fcc: outbox
Karsten Hopp 0b432d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 0b432d
Mime-Version: 1.0
Karsten Hopp 0b432d
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 0b432d
Content-Transfer-Encoding: 8bit
Karsten Hopp 0b432d
------------
Karsten Hopp 0b432d
Karsten Hopp 0b432d
Patch 7.0.072
Karsten Hopp 0b432d
Problem:    When starting the GUI fails there is no way to adjust settings or
Karsten Hopp 0b432d
	    do something else.
Karsten Hopp 0b432d
Solution:   Add the GUIFailed autocommand event.
Karsten Hopp 0b432d
Files:	    src/fileio.c, src/gui.c, src/vim.h
Karsten Hopp 0b432d
Karsten Hopp 0b432d
Karsten Hopp 0b432d
*** ../vim-7.0.071/src/fileio.c	Wed Aug 16 19:34:59 2006
Karsten Hopp 0b432d
--- src/fileio.c	Tue Aug 29 10:11:35 2006
Karsten Hopp 0b432d
***************
Karsten Hopp 0b432d
*** 6980,6985 ****
Karsten Hopp 0b432d
--- 6980,6986 ----
Karsten Hopp 0b432d
      {"FocusLost",	EVENT_FOCUSLOST},
Karsten Hopp 0b432d
      {"FuncUndefined",	EVENT_FUNCUNDEFINED},
Karsten Hopp 0b432d
      {"GUIEnter",	EVENT_GUIENTER},
Karsten Hopp 0b432d
+     {"GUIFailed",	EVENT_GUIFAILED},
Karsten Hopp 0b432d
      {"InsertChange",	EVENT_INSERTCHANGE},
Karsten Hopp 0b432d
      {"InsertEnter",	EVENT_INSERTENTER},
Karsten Hopp 0b432d
      {"InsertLeave",	EVENT_INSERTLEAVE},
Karsten Hopp 0b432d
*** ../vim-7.0.071/src/gui.c	Tue Jun 20 20:39:32 2006
Karsten Hopp 0b432d
--- src/gui.c	Tue Aug 29 10:12:32 2006
Karsten Hopp 0b432d
***************
Karsten Hopp 0b432d
*** 187,195 ****
Karsten Hopp 0b432d
  #endif
Karsten Hopp 0b432d
  
Karsten Hopp 0b432d
  #ifdef FEAT_AUTOCMD
Karsten Hopp 0b432d
!     /* If the GUI started successfully, trigger the GUIEnter event */
Karsten Hopp 0b432d
!     if (gui.in_use)
Karsten Hopp 0b432d
! 	apply_autocmds(EVENT_GUIENTER, NULL, NULL, FALSE, curbuf);
Karsten Hopp 0b432d
  #endif
Karsten Hopp 0b432d
  
Karsten Hopp 0b432d
      --recursive;
Karsten Hopp 0b432d
--- 187,196 ----
Karsten Hopp 0b432d
  #endif
Karsten Hopp 0b432d
  
Karsten Hopp 0b432d
  #ifdef FEAT_AUTOCMD
Karsten Hopp 0b432d
!     /* If the GUI started successfully, trigger the GUIEnter event, otherwise
Karsten Hopp 0b432d
!      * the GUIFailed event. */
Karsten Hopp 0b432d
!     apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
Karsten Hopp 0b432d
! 						   NULL, NULL, FALSE, curbuf);
Karsten Hopp 0b432d
  #endif
Karsten Hopp 0b432d
  
Karsten Hopp 0b432d
      --recursive;
Karsten Hopp 0b432d
*** ../vim-7.0.071/src/vim.h	Fri Jun 23 16:33:41 2006
Karsten Hopp 0b432d
--- src/vim.h	Tue Aug 29 10:12:47 2006
Karsten Hopp 0b432d
***************
Karsten Hopp 0b432d
*** 1120,1125 ****
Karsten Hopp 0b432d
--- 1120,1126 ----
Karsten Hopp 0b432d
      EVENT_FOCUSGAINED,		/* got the focus */
Karsten Hopp 0b432d
      EVENT_FOCUSLOST,		/* lost the focus to another app */
Karsten Hopp 0b432d
      EVENT_GUIENTER,		/* after starting the GUI */
Karsten Hopp 0b432d
+     EVENT_GUIFAILED,		/* after starting the GUI failed */
Karsten Hopp 0b432d
      EVENT_INSERTCHANGE,		/* when changing Insert/Replace mode */
Karsten Hopp 0b432d
      EVENT_INSERTENTER,		/* when entering Insert mode */
Karsten Hopp 0b432d
      EVENT_INSERTLEAVE,		/* when leaving Insert mode */
Karsten Hopp 0b432d
*** ../vim-7.0.071/src/version.c	Tue Aug 29 18:01:39 2006
Karsten Hopp 0b432d
--- src/version.c	Tue Aug 29 18:15:13 2006
Karsten Hopp 0b432d
***************
Karsten Hopp 0b432d
*** 668,669 ****
Karsten Hopp 0b432d
--- 668,671 ----
Karsten Hopp 0b432d
  {   /* Add new patch number below this line */
Karsten Hopp 0b432d
+ /**/
Karsten Hopp 0b432d
+     72,
Karsten Hopp 0b432d
  /**/
Karsten Hopp 0b432d
Karsten Hopp 0b432d
-- 
Karsten Hopp 0b432d
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 0b432d
269. You receive an e-mail from the wife of a deceased president, offering
Karsten Hopp 0b432d
     to send you twenty million dollar, and you are not even surprised.
Karsten Hopp 0b432d
Karsten Hopp 0b432d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 0b432d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 0b432d
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 0b432d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///