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 / old / 5.4.10 < prev    next >
Encoding:
Internet Message Format  |  1999-07-30  |  3.6 KB

  1. To: Daniel Burrows <Daniel_Burrows@brown.edu>
  2. Cc: Wichert Akkerman <wakkerma@wi.leidenuniv.nl>, vim-dev@vim.org
  3. Subject: patch 5.4.10 (was: Bug#42161: gvim -f doesn't work outside X any more)
  4. In-Reply-To: <19990730074749.A11626@bluegreen.dhis.org>
  5. Fcc: outbox
  6. From: Bram Moolenaar <Bram@moolenaar.net>
  7. ------------
  8.  
  9. Daniel Burrows wrote:
  10.  
  11. > On Fri, Jul 30, 1999 at 01:38:59PM +0200, Bram Moolenaar was heard to say:
  12. > > This problem is caused by gtk_init().  When it can't open the display, it
  13. > > just exits.  Not very kind!
  14. >   I just poked around in the GTK headers and found another initialization
  15. > function, gtk_init_check().  It appears to try to open the display and return
  16. > true for success, or false for failure.  (in fact, the implementation of
  17. > gtk_init() is basically: if(!gtk_init_check(argc,argv))
  18. > print_error_and_exit() )
  19. >   This might be helpful for you :)
  20.  
  21. Certainly!  This makes the patch much simpler.  And safer to include.
  22. I'll make a numbered patch for it now.
  23.  
  24.  
  25. Patch 5.4.10
  26. Problem:    GTK GUI: When $DISPLAY is invalid, "gvim -f" just exits.  It
  27.             should run in the terminal.
  28. Solution:   Use gtk_init_check() instead of gtk_init().
  29. Files:      src/gui_gtk_x11.c
  30.  
  31.  
  32. *** ../vim-5.4/src/gui_gtk_x11.c    Sun Jul 25 22:02:11 1999
  33. --- src/gui_gtk_x11.c    Fri Jul 30 19:42:36 1999
  34. ***************
  35. *** 753,767 ****
  36.       gtk_set_locale();
  37.   #endif
  38.   
  39. !     gtk_init(&gui_argc, &gui_argv);
  40. !     vim_free(gui_argv);
  41. !     if (!GDK_DISPLAY())
  42.       {
  43.       gui.dying = TRUE;
  44.       EMSG("cannot open display");
  45.       return FAIL;
  46.       }
  47.   
  48.       /* Somehow I can't resist the feeling that we should move the
  49.        * corrseponding code out of the terminal section and
  50. --- 753,766 ----
  51.       gtk_set_locale();
  52.   #endif
  53.   
  54. !     /* Don't use gtk_init(), it exits on failure. */
  55. !     if (!gtk_init_check(&gui_argc, &gui_argv))
  56.       {
  57.       gui.dying = TRUE;
  58.       EMSG("cannot open display");
  59.       return FAIL;
  60.       }
  61. +     vim_free(gui_argv);
  62.   
  63.       /* Somehow I can't resist the feeling that we should move the
  64.        * corrseponding code out of the terminal section and
  65. *** ../vim-5.4/src/version.h    Fri Jul 30 09:54:57 1999
  66. --- src/version.h    Sat Jul 31 16:28:09 1999
  67. ***************
  68. *** 19,26 ****
  69.   #define VIM_VERSION_MINOR_STR        "4"
  70.   #define VIM_VERSION_BUILD         57
  71.   #define VIM_VERSION_BUILD_STR        "57"
  72. ! #define VIM_VERSION_PATCHLEVEL         9
  73. ! #define VIM_VERSION_PATCHLEVEL_STR    "9"
  74.   
  75.   /*
  76.    * VIM_VERSION_NODOT is used for the runtime directory name.
  77. --- 19,26 ----
  78.   #define VIM_VERSION_MINOR_STR        "4"
  79.   #define VIM_VERSION_BUILD         57
  80.   #define VIM_VERSION_BUILD_STR        "57"
  81. ! #define VIM_VERSION_PATCHLEVEL         10
  82. ! #define VIM_VERSION_PATCHLEVEL_STR    "10"
  83.   
  84.   /*
  85.    * VIM_VERSION_NODOT is used for the runtime directory name.
  86. ***************
  87. *** 30,35 ****
  88.    */
  89.   #define VIM_VERSION_NODOT    "vim54"
  90.   #define VIM_VERSION_SHORT    "5.4"
  91. ! #define VIM_VERSION_MEDIUM    "5.4.9"
  92. ! #define VIM_VERSION_LONG    "VIM - Vi IMproved 5.4.9 (1999 Jul 29)"
  93. ! #define VIM_VERSION_LONG_DATE    "VIM - Vi IMproved 5.4.9 (1999 Jul 29, compiled "
  94. --- 30,35 ----
  95.    */
  96.   #define VIM_VERSION_NODOT    "vim54"
  97.   #define VIM_VERSION_SHORT    "5.4"
  98. ! #define VIM_VERSION_MEDIUM    "5.4.10"
  99. ! #define VIM_VERSION_LONG    "VIM - Vi IMproved 5.4.10 (1999 Jul 30)"
  100. ! #define VIM_VERSION_LONG_DATE    "VIM - Vi IMproved 5.4.10 (1999 Jul 30, compiled "
  101. --
  102. ARTHUR:        I command you as King of the Britons to stand aside!
  103. BLACK KNIGHT:  I move for no man.
  104.                                   The Quest for the Holy Grail (Monty Python)
  105.  
  106. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  107.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  108.