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 / 7.0 / 7.0.129 < prev    next >
Encoding:
Internet Message Format  |  2006-10-09  |  2.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.0.129
  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 7.0.129
  11. Problem:    GTK GUI: the GTK file dialog can't handle a relative path.
  12. Solution:   Make the initial directory a full path before passing it to GTK.
  13.         (James Vega)  Also postpone adding the default file name until
  14.         after setting the directory.
  15. Files:        src/gui_gtk.c
  16.  
  17.  
  18. *** ../vim-7.0.128/src/gui_gtk.c    Tue Aug 29 17:28:56 2006
  19. --- src/gui_gtk.c    Tue Oct 10 18:16:00 2006
  20. ***************
  21. *** 1275,1292 ****
  22.       title = CONVERT_TO_UTF8(title);
  23.   # endif
  24.   
  25. !     /* Concatenate "initdir" and "dflt". */
  26.       if (initdir == NULL || *initdir == NUL)
  27.       mch_dirname(dirbuf, MAXPATHL);
  28. !     else if (STRLEN(initdir) + 2 < MAXPATHL)
  29. !     STRCPY(dirbuf, initdir);
  30. !     else
  31.       dirbuf[0] = NUL;
  32.       /* Always need a trailing slash for a directory. */
  33.       add_pathsep(dirbuf);
  34. -     if (dflt != NULL && *dflt != NUL
  35. -                   && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL)
  36. -     STRCAT(dirbuf, dflt);
  37.   
  38.       /* If our pointer is currently hidden, then we should show it. */
  39.       gui_mch_mousehide(FALSE);
  40. --- 1275,1287 ----
  41.       title = CONVERT_TO_UTF8(title);
  42.   # endif
  43.   
  44. !     /* GTK has a bug, it only works with an absolute path. */
  45.       if (initdir == NULL || *initdir == NUL)
  46.       mch_dirname(dirbuf, MAXPATHL);
  47. !     else if (vim_FullName(initdir, dirbuf, MAXPATHL - 2, FALSE) == FAIL)
  48.       dirbuf[0] = NUL;
  49.       /* Always need a trailing slash for a directory. */
  50.       add_pathsep(dirbuf);
  51.   
  52.       /* If our pointer is currently hidden, then we should show it. */
  53.       gui_mch_mousehide(FALSE);
  54. ***************
  55. *** 1340,1345 ****
  56. --- 1335,1345 ----
  57.       }
  58.       else
  59.       gtk_window_set_title(GTK_WINDOW(gui.filedlg), (const gchar *)title);
  60. +     /* Concatenate "initdir" and "dflt". */
  61. +     if (dflt != NULL && *dflt != NUL
  62. +                   && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL)
  63. +     STRCAT(dirbuf, dflt);
  64.   
  65.       gtk_file_selection_set_filename(GTK_FILE_SELECTION(gui.filedlg),
  66.                                 (const gchar *)dirbuf);
  67. *** ../vim-7.0.128/src/version.c    Tue Oct 10 17:36:50 2006
  68. --- src/version.c    Tue Oct 10 18:25:11 2006
  69. ***************
  70. *** 668,669 ****
  71. --- 668,671 ----
  72.   {   /* Add new patch number below this line */
  73. + /**/
  74. +     129,
  75.   /**/
  76.  
  77. -- 
  78. I'm not familiar with this proof, but I'm aware of a significant
  79. following of toddlers who believe that peanut butter is the solution
  80. to all of life's problems...         -- Tim Hammerquist
  81.  
  82.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  83. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  84. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  85.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  86.