home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.1.243 < prev    next >
Encoding:
Internet Message Format  |  2002-10-26  |  3.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.243 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.243 (extra)
  11. Problem:    Win32: When the OLE version is started and wasn't registered, a
  12.         message pops up to suggest registering, even when this isn't
  13.         possible (when the registry is not writable).
  14. Solution:   Check if registering is possible before asking whether it should
  15.         be done. (Walter Briscoe)
  16.         Also avoid restarting Vim after registering.
  17. Files:        src/if_ole.cpp
  18.  
  19.  
  20. *** ../vim61.242/src/if_ole.cpp    Fri Aug 24 11:54:37 2001
  21. --- src/if_ole.cpp    Sun Oct 27 21:00:44 2002
  22. ***************
  23. *** 124,141 ****
  24.   
  25.       // Load the type library from the registry
  26.       hr = LoadRegTypeLib(MYLIBID, 1, 0, 0x00, &typelib);
  27.       if (FAILED(hr))
  28.       {
  29. !     delete me;
  30.       if (MessageBox(0, "Cannot load registered type library.\nDo you want to register Vim now?",
  31. !             "Vim Initialisation", MB_YESNO | MB_ICONQUESTION) == IDYES)
  32.       {
  33. !         RegisterMe(FALSE);
  34. !         MessageBox(0, "You must restart Vim in order for the registration to take effect.", "Vim Initialisation", 0);
  35.           *pbDoRestart = TRUE;
  36.       }
  37. -     return NULL;
  38.       }
  39.   
  40.       // Get the type info of the vtable interface
  41. --- 124,162 ----
  42.   
  43.       // Load the type library from the registry
  44.       hr = LoadRegTypeLib(MYLIBID, 1, 0, 0x00, &typelib);
  45.       if (FAILED(hr))
  46.       {
  47. !     HKEY hKey;
  48. !     // Check we can write to the registry.
  49. !     // RegCreateKeyEx succeeds even if key exists. W.Briscoe W2K 20021011
  50. !     if (RegCreateKeyEx(HKEY_CLASSES_ROOT, MYVIPROGID, 0, NULL,
  51. !           REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, NULL))
  52. !     {
  53. !         delete me;
  54. !         return NULL; // Unable to write to registry. Quietly fail.
  55. !     }
  56. !     RegCloseKey(hKey);
  57.       if (MessageBox(0, "Cannot load registered type library.\nDo you want to register Vim now?",
  58. !             "Vim Initialisation", MB_YESNO | MB_ICONQUESTION) != IDYES)
  59. !     {
  60. !         delete me;
  61. !         return NULL;
  62. !     }
  63. !     RegisterMe(FALSE);
  64. !     // Load the type library from the registry
  65. !     hr = LoadRegTypeLib(MYLIBID, 1, 0, 0x00, &typelib);
  66. !     if (FAILED(hr))
  67.       {
  68. !         MessageBox(0, "You must restart Vim in order for the registration to take effect.",
  69. !                              "Vim Initialisation", 0);
  70.           *pbDoRestart = TRUE;
  71. +         delete me;
  72. +         return NULL;
  73.       }
  74.       }
  75.   
  76.       // Get the type info of the vtable interface
  77. ***************
  78. *** 144,150 ****
  79.   
  80.       if (FAILED(hr))
  81.       {
  82. !     MessageBox(0, "Cannot get interface type information", "Vim Initialisation", 0);
  83.       delete me;
  84.       return NULL;
  85.       }
  86. --- 165,172 ----
  87.   
  88.       if (FAILED(hr))
  89.       {
  90. !     MessageBox(0, "Cannot get interface type information",
  91. !                              "Vim Initialisation", 0);
  92.       delete me;
  93.       return NULL;
  94.       }
  95. *** ../vim61.242/src/version.c    Sun Oct 27 20:54:51 2002
  96. --- src/version.c    Sun Oct 27 21:00:50 2002
  97. ***************
  98. *** 608,609 ****
  99. --- 608,611 ----
  100.   {   /* Add new patch number below this line */
  101. + /**/
  102. +     243,
  103.   /**/
  104.  
  105. -- 
  106. WOMAN:   Dennis, there's some lovely filth down here.  Oh -- how d'you do?
  107. ARTHUR:  How do you do, good lady.  I am Arthur, King of the Britons.
  108.          Who's castle is that?
  109. WOMAN:   King of the who?
  110.                                   The Quest for the Holy Grail (Monty Python)
  111.  
  112.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  113. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  114. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  115.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  116.