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.0.247 < prev    next >
Encoding:
Internet Message Format  |  2002-02-20  |  3.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.247
  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.0.247
  11. Problem:    GTK GUI: Can't use gvim in a kpart widget.
  12. Solution:   Add the "--echo-wid" argument to let Vim echo the window ID on
  13.         stdout. (Philippe Fremy)
  14. Files:        runtime/doc/starting.txt, src/globals.h, src/gui_gtk_x11.c,
  15.         src/main.c
  16.  
  17.  
  18. *** ../vim60.246/runtime/doc/starting.txt    Mon Feb 18 12:08:34 2002
  19. --- runtime/doc/starting.txt    Thu Feb 21 17:01:14 2002
  20. ***************
  21. *** 1,4 ****
  22. ! *starting.txt*  For Vim version 6.0.  Last change: 2002 Feb 18
  23.   
  24.   
  25.             VIM REFERENCE MANUAL    by Bram Moolenaar
  26. --- 1,4 ----
  27. ! *starting.txt*  For Vim version 6.0.  Last change: 2002 Feb 21
  28.   
  29.   
  30.             VIM REFERENCE MANUAL    by Bram Moolenaar
  31. ***************
  32. *** 483,488 ****
  33. --- 483,495 ----
  34.           GTK+ GUI Vim only.  Make gvim try to use GtkPlug mechanism, so
  35.           that it runs inside another window.  See |gui-gtk-socketid|
  36.           for details. {not in Vi}
  37. + --echo-wid                        *--echo-wid*
  38. +         GTK+ GUI Vim only.  Make gvim echo the Window ID on stdout,
  39. +         which can be used to run gvim in a kpart widget.  The format
  40. +         of the output is:
  41. +             WID: 12345\n
  42. +         {not in Vi}
  43.   
  44.   
  45.   Example for using a script file to change a name in several files:
  46. *** ../vim60.246/src/globals.h    Mon Feb 18 12:08:34 2002
  47. --- src/globals.h    Thu Feb 21 16:57:02 2002
  48. ***************
  49. *** 965,970 ****
  50. --- 966,972 ----
  51.   
  52.   #ifdef FEAT_GUI_GTK
  53.   EXTERN guint32    gtk_socket_id INIT(= 0);
  54. + EXTERN int    echo_wid_arg INIT(= FALSE);    /* --echo-wid argument */
  55.   #endif
  56.   
  57.   #ifdef FEAT_CLIENTSERVER
  58. *** ../vim60.246/src/gui_gtk_x11.c    Mon Feb 11 12:01:33 2002
  59. --- src/gui_gtk_x11.c    Thu Feb 21 16:53:14 2002
  60. ***************
  61. *** 1632,1637 ****
  62. --- 1632,1644 ----
  63.       XIconSize        *size;
  64.       int            number_sizes;
  65.   
  66. +     /* When started with "--echo-wid" argument, write window ID on stdout. */
  67. +     if (echo_wid_arg)
  68. +     {
  69. +     printf("WID: %ld\n", (long)GDK_WINDOW_XWINDOW(gui.mainwin->window));
  70. +     fflush(stdout);
  71. +     }
  72.       if (vim_strchr(p_go, GO_ICON) != NULL)
  73.       {
  74.       /*
  75. *** ../vim60.246/src/main.c    Mon Feb 18 12:08:34 2002
  76. --- src/main.c    Thu Feb 21 16:59:30 2002
  77. ***************
  78. *** 292,297 ****
  79. --- 292,299 ----
  80.           mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
  81.           i++;
  82.       }
  83. +     else if (STRICMP(argv[i], "--echo-wid") == 0)
  84. +         echo_wid_arg = TRUE;
  85.   # endif
  86.       }
  87.   #endif
  88. ***************
  89. *** 563,568 ****
  90. --- 565,574 ----
  91.               --argc;
  92.               ++argv;
  93.               }
  94. +         }
  95. +         else if (STRNICMP(argv[0] + argv_idx, "echo-wid", 8) == 0)
  96. +         {
  97. +             /* already processed, skip */
  98.           }
  99.   #endif
  100.           else
  101. *** ../vim60.246/src/version.c    Thu Feb 21 16:37:34 2002
  102. --- src/version.c    Thu Feb 21 17:07:15 2002
  103. ***************
  104. *** 608,609 ****
  105. --- 608,611 ----
  106.   {   /* Add new patch number below this line */
  107. + /**/
  108. +     247,
  109.   /**/
  110.  
  111. -- 
  112. The only way the average employee can speak to an executive is by taking a
  113. second job as a golf caddie.
  114.                 (Scott Adams - The Dilbert principle)
  115.  
  116.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  117. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  118. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  119.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  120.