|
Karsten Hopp |
8789c3 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
8789c3 |
Subject: Patch 7.0.129
|
|
Karsten Hopp |
8789c3 |
Fcc: outbox
|
|
Karsten Hopp |
8789c3 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
8789c3 |
Mime-Version: 1.0
|
|
Karsten Hopp |
8789c3 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
8789c3 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
8789c3 |
------------
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
Patch 7.0.129
|
|
Karsten Hopp |
8789c3 |
Problem: GTK GUI: the GTK file dialog can't handle a relative path.
|
|
Karsten Hopp |
8789c3 |
Solution: Make the initial directory a full path before passing it to GTK.
|
|
Karsten Hopp |
8789c3 |
(James Vega) Also postpone adding the default file name until
|
|
Karsten Hopp |
8789c3 |
after setting the directory.
|
|
Karsten Hopp |
8789c3 |
Files: src/gui_gtk.c
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
*** ../vim-7.0.128/src/gui_gtk.c Tue Aug 29 17:28:56 2006
|
|
Karsten Hopp |
8789c3 |
--- src/gui_gtk.c Tue Oct 10 18:16:00 2006
|
|
Karsten Hopp |
8789c3 |
***************
|
|
Karsten Hopp |
8789c3 |
*** 1275,1292 ****
|
|
Karsten Hopp |
8789c3 |
title = CONVERT_TO_UTF8(title);
|
|
Karsten Hopp |
8789c3 |
# endif
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
! /* Concatenate "initdir" and "dflt". */
|
|
Karsten Hopp |
8789c3 |
if (initdir == NULL || *initdir == NUL)
|
|
Karsten Hopp |
8789c3 |
mch_dirname(dirbuf, MAXPATHL);
|
|
Karsten Hopp |
8789c3 |
! else if (STRLEN(initdir) + 2 < MAXPATHL)
|
|
Karsten Hopp |
8789c3 |
! STRCPY(dirbuf, initdir);
|
|
Karsten Hopp |
8789c3 |
! else
|
|
Karsten Hopp |
8789c3 |
dirbuf[0] = NUL;
|
|
Karsten Hopp |
8789c3 |
/* Always need a trailing slash for a directory. */
|
|
Karsten Hopp |
8789c3 |
add_pathsep(dirbuf);
|
|
Karsten Hopp |
8789c3 |
- if (dflt != NULL && *dflt != NUL
|
|
Karsten Hopp |
8789c3 |
- && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL)
|
|
Karsten Hopp |
8789c3 |
- STRCAT(dirbuf, dflt);
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
/* If our pointer is currently hidden, then we should show it. */
|
|
Karsten Hopp |
8789c3 |
gui_mch_mousehide(FALSE);
|
|
Karsten Hopp |
8789c3 |
--- 1275,1287 ----
|
|
Karsten Hopp |
8789c3 |
title = CONVERT_TO_UTF8(title);
|
|
Karsten Hopp |
8789c3 |
# endif
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
! /* GTK has a bug, it only works with an absolute path. */
|
|
Karsten Hopp |
8789c3 |
if (initdir == NULL || *initdir == NUL)
|
|
Karsten Hopp |
8789c3 |
mch_dirname(dirbuf, MAXPATHL);
|
|
Karsten Hopp |
8789c3 |
! else if (vim_FullName(initdir, dirbuf, MAXPATHL - 2, FALSE) == FAIL)
|
|
Karsten Hopp |
8789c3 |
dirbuf[0] = NUL;
|
|
Karsten Hopp |
8789c3 |
/* Always need a trailing slash for a directory. */
|
|
Karsten Hopp |
8789c3 |
add_pathsep(dirbuf);
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
/* If our pointer is currently hidden, then we should show it. */
|
|
Karsten Hopp |
8789c3 |
gui_mch_mousehide(FALSE);
|
|
Karsten Hopp |
8789c3 |
***************
|
|
Karsten Hopp |
8789c3 |
*** 1340,1345 ****
|
|
Karsten Hopp |
8789c3 |
--- 1335,1345 ----
|
|
Karsten Hopp |
8789c3 |
}
|
|
Karsten Hopp |
8789c3 |
else
|
|
Karsten Hopp |
8789c3 |
gtk_window_set_title(GTK_WINDOW(gui.filedlg), (const gchar *)title);
|
|
Karsten Hopp |
8789c3 |
+
|
|
Karsten Hopp |
8789c3 |
+ /* Concatenate "initdir" and "dflt". */
|
|
Karsten Hopp |
8789c3 |
+ if (dflt != NULL && *dflt != NUL
|
|
Karsten Hopp |
8789c3 |
+ && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL)
|
|
Karsten Hopp |
8789c3 |
+ STRCAT(dirbuf, dflt);
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
gtk_file_selection_set_filename(GTK_FILE_SELECTION(gui.filedlg),
|
|
Karsten Hopp |
8789c3 |
(const gchar *)dirbuf);
|
|
Karsten Hopp |
8789c3 |
*** ../vim-7.0.128/src/version.c Tue Oct 10 17:36:50 2006
|
|
Karsten Hopp |
8789c3 |
--- src/version.c Tue Oct 10 18:25:11 2006
|
|
Karsten Hopp |
8789c3 |
***************
|
|
Karsten Hopp |
8789c3 |
*** 668,669 ****
|
|
Karsten Hopp |
8789c3 |
--- 668,671 ----
|
|
Karsten Hopp |
8789c3 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
8789c3 |
+ /**/
|
|
Karsten Hopp |
8789c3 |
+ 129,
|
|
Karsten Hopp |
8789c3 |
/**/
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
--
|
|
Karsten Hopp |
8789c3 |
I'm not familiar with this proof, but I'm aware of a significant
|
|
Karsten Hopp |
8789c3 |
following of toddlers who believe that peanut butter is the solution
|
|
Karsten Hopp |
8789c3 |
to all of life's problems... -- Tim Hammerquist
|
|
Karsten Hopp |
8789c3 |
|
|
Karsten Hopp |
8789c3 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
8789c3 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
8789c3 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
8789c3 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|