diff options
| author | Jason Rumney | 2000-07-15 11:52:21 +0000 |
|---|---|---|
| committer | Jason Rumney | 2000-07-15 11:52:21 +0000 |
| commit | 86fb1a79025519e854e50230f88fb0892bce73e8 (patch) | |
| tree | ce1d87fb99d52fd0586f38400a5e2d928486ae62 /src | |
| parent | d4b7d6b4944e4b639eafbc49284e0233009b0820 (diff) | |
| download | emacs-86fb1a79025519e854e50230f88fb0892bce73e8.tar.gz emacs-86fb1a79025519e854e50230f88fb0892bce73e8.zip | |
(w32_menu_show): Call free_menubar_widget_value_tree after menu is
finished with.
(add_menu_item): Only consider wv->title as a menu title.
(w32_menu_display_help): Add OBJECT and POS to show_help_echo.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32menu.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index 995c3ef254b..52baa248a46 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -1747,9 +1747,6 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1747 | pos.y = y; | 1747 | pos.y = y; |
| 1748 | ClientToScreen (FRAME_W32_WINDOW (f), &pos); | 1748 | ClientToScreen (FRAME_W32_WINDOW (f), &pos); |
| 1749 | 1749 | ||
| 1750 | /* Free the widget_value objects we used to specify the contents. */ | ||
| 1751 | free_menubar_widget_value_tree (first_wv); | ||
| 1752 | |||
| 1753 | /* No selection has been chosen yet. */ | 1750 | /* No selection has been chosen yet. */ |
| 1754 | menu_item_selection = 0; | 1751 | menu_item_selection = 0; |
| 1755 | 1752 | ||
| @@ -1762,6 +1759,9 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1762 | during the call. */ | 1759 | during the call. */ |
| 1763 | discard_mouse_events (); | 1760 | discard_mouse_events (); |
| 1764 | 1761 | ||
| 1762 | /* Free the widget_value objects we used to specify the contents. */ | ||
| 1763 | free_menubar_widget_value_tree (first_wv); | ||
| 1764 | |||
| 1765 | DestroyMenu (menu); | 1765 | DestroyMenu (menu); |
| 1766 | 1766 | ||
| 1767 | /* Find the selected item, and its pane, to return | 1767 | /* Find the selected item, and its pane, to return |
| @@ -2056,7 +2056,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 2056 | else | 2056 | else |
| 2057 | out_string = wv->name; | 2057 | out_string = wv->name; |
| 2058 | 2058 | ||
| 2059 | if (wv->title || wv->call_data == 0) | 2059 | if (wv->title) |
| 2060 | { | 2060 | { |
| 2061 | #if 0 /* no GC while popup menu is active */ | 2061 | #if 0 /* no GC while popup menu is active */ |
| 2062 | out_string = LocalAlloc (0, strlen (wv->name) + 1); | 2062 | out_string = LocalAlloc (0, strlen (wv->name) + 1); |
| @@ -2170,7 +2170,8 @@ w32_menu_display_help (HMENU menu, UINT item, UINT flags) | |||
| 2170 | get_menu_item_info (menu, item, FALSE, &info); | 2170 | get_menu_item_info (menu, item, FALSE, &info); |
| 2171 | 2171 | ||
| 2172 | show_help_echo (info.dwItemData ? | 2172 | show_help_echo (info.dwItemData ? |
| 2173 | build_string ((char *) info.dwItemData) : Qnil, 1); | 2173 | build_string ((char *) info.dwItemData) : Qnil, |
| 2174 | Qnil, -1, 1); | ||
| 2174 | } | 2175 | } |
| 2175 | } | 2176 | } |
| 2176 | 2177 | ||