]> git.pld-linux.org Git - packages/vim.git/blame - 7.0.129
- new
[packages/vim.git] / 7.0.129
CommitLineData
f3c378e8
AG
1To: vim-dev@vim.org
2Subject: Patch 7.0.129
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.0.129
11Problem: GTK GUI: the GTK file dialog can't handle a relative path.
12Solution: 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.
15Files: 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+
61+ /* Concatenate "initdir" and "dflt". */
62+ if (dflt != NULL && *dflt != NUL
63+ && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL)
64+ STRCAT(dirbuf, dflt);
65
66 gtk_file_selection_set_filename(GTK_FILE_SELECTION(gui.filedlg),
67 (const gchar *)dirbuf);
68*** ../vim-7.0.128/src/version.c Tue Oct 10 17:36:50 2006
69--- src/version.c Tue Oct 10 18:25:11 2006
70***************
71*** 668,669 ****
72--- 668,671 ----
73 { /* Add new patch number below this line */
74+ /**/
75+ 129,
76 /**/
77
78--
79I'm not familiar with this proof, but I'm aware of a significant
80following of toddlers who believe that peanut butter is the solution
81to all of life's problems... -- Tim Hammerquist
82
83 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
84/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
85\\\ download, build and distribute -- http://www.A-A-P.org ///
86 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.041947 seconds and 4 git commands to generate.