]> git.pld-linux.org Git - packages/vim.git/blame - 6.2.258
- fix for current libselinux
[packages/vim.git] / 6.2.258
CommitLineData
ffd6c6e3
AG
1To: vim-dev@vim.org
2Subject: Patch 6.2.258
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 6.2.258
11Problem: GUI: can't disable (grey-out) a popup menu item. (Ajit Thakkar)
12Solution: Loop over the popup menus for all modes.
13Files: src/menu.c
14
15
16*** ../vim-6.2.257/src/menu.c Sun Oct 12 16:42:14 2003
17--- src/menu.c Sun Feb 15 13:32:48 2004
18***************
19*** 331,340 ****
20--- 331,356 ----
21 {
22 /*
23 * Change sensitivity of the menu.
24+ * For the PopUp menu, remove a menu for each mode separately.
25 * Careful: menu_nable_recurse() changes menu_path.
26 */
27 if (STRCMP(menu_path, "*") == 0) /* meaning: do all menus */
28 menu_path = (char_u *)"";
29+
30+ if (menu_is_popup(menu_path))
31+ {
32+ for (i = 0; i < MENU_INDEX_TIP; ++i)
33+ if (modes & (1 << i))
34+ {
35+ p = popup_mode_name(menu_path, i);
36+ if (p != NULL)
37+ {
38+ menu_nable_recurse(root_menu, p, MENU_ALL_MODES,
39+ enable);
40+ vim_free(p);
41+ }
42+ }
43+ }
44 menu_nable_recurse(root_menu, menu_path, modes, enable);
45 }
46 else if (unmenu)
47***************
48*** 1629,1637 ****
49 return (STRNCMP(name, "PopUp", 5) == 0);
50 }
51
52! #if defined(FEAT_GUI_MOTIF) || defined(PROTO)
53 /*
54! * Return TRUE if "name" is part of a poup menu.
55 */
56 int
57 menu_is_child_of_popup(menu)
58--- 1645,1653 ----
59 return (STRNCMP(name, "PopUp", 5) == 0);
60 }
61
62! #if (defined(FEAT_GUI_MOTIF) && (XmVersion <= 1002)) || defined(PROTO)
63 /*
64! * Return TRUE if "name" is part of a popup menu.
65 */
66 int
67 menu_is_child_of_popup(menu)
68*** ../vim-6.2.257/src/version.c Sun Feb 15 13:29:04 2004
69--- src/version.c Sun Feb 15 13:31:40 2004
70***************
71*** 639,640 ****
72--- 639,642 ----
73 { /* Add new patch number below this line */
74+ /**/
75+ 258,
76 /**/
77
78--
79Fingers not found - Pound head on keyboard to continue.
80
81 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
82/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
83\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
84 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
This page took 0.029204 seconds and 4 git commands to generate.