Commit graph

76 commits

Author SHA1 Message Date
Thien-Thi Nguyen
0b5538bd85 Update years in copyright notice; nfc. 2005-08-07 12:33:19 +00:00
Jason Rumney
94c7f25790 (w32_menu_display_help): Suppress tooltip when navigating menus with
the keyboard.
2005-07-25 22:17:02 +00:00
Lute Kamstra
4fc5845fe8 Update FSF's address. 2005-07-04 16:49:24 +00:00
Kim F. Storm
89f2614d96 * composite.c (compose_chars_in_text):
* eval.c (do_autoload):
* macmenu.c (set_frame_menubar):
* process.c (read_process_output, exec_sentinel):
* xmenu.c (set_frame_menubar):
* xdisp.c (prepare_menu_bars, update_menu_bar, update_tool_bar):
* w32menu.c (set_frame_menubar):
Use record_unwind_save_match_data.
Rename restore_match_data to restore_search_regs.
2005-06-08 22:33:36 +00:00
Nick Roberts
16b1266812 (Fx_popup_dialog): Allow 3rd optional argument. 2005-05-24 08:45:35 +00:00
Nick Roberts
d23928c704 (Fx_popup_dialog): Add a third boolean argument to select frame title
("Question"/"Information").
(w32_dialog_show): Use it.
2005-05-24 08:38:58 +00:00
Jason Rumney
f0f90717f8 (AppendMenuW_Proc): Move declaration to w32term.h. 2004-09-07 21:50:39 +00:00
Jason Rumney
1f06d36755 (_widget_value): Added lname and lkey.
(digest_single_submenu): Set lname and lkey in widget_value
instead of name and key.
(update_submenu_strings): New function.
(set_frame_menubar): Remove call to inhibit_garbage_collection,
call update_submenu_strings.

(globals_of_w32menu): Check for Unicode API.
(digest_single_submenu, w32_menu_show): Encode menu strings as
UTF-8 if Unicode API is available.
(utf8to16): New function.
(add_menu_item): Use it when calling Unicode API.
2004-09-02 23:26:16 +00:00
Jason Rumney
24ee97634d (add_menu_item, w32_menu_display_help) [USE_LISP_UNION_TYPE]: Cast
from Lisp_Object using i member.
2004-05-18 19:53:08 +00:00
Kim F. Storm
f2dcea2bf9 (Qmouse_click, Qevent_kind): Remove unused externs. 2003-12-27 23:16:53 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Stefan Monnier
f456401b96 (menubar_selection_callback): Don't pass uninitialized
data to kbd_buffer_store_event.
2003-06-15 21:05:34 +00:00
Kim F. Storm
90022f5a3e Make (few) trivial substitutions for renamed and
new macros in dispextern.h, frame.h and window.h.
2003-05-24 22:07:03 +00:00
Juanma Barranquero
177c0ea743 Trailing whitespace deleted. 2003-02-04 14:56:31 +00:00
Jason Rumney
fe04b8c806 (digest_single_submenu): Declare all args.
Sync with 2002-12-23  Richard M. Stallman  <rms@gnu.org>
changes in xmenu.c:

(parse_single_submenu): Use individual keymap's prompt
string as pane name, if there is one.
(set_frame_menubar): Save menu_items_n_panes from each call to
parse_single_submenu and use it when calling digest_single_submenu.
2003-01-20 20:18:13 +00:00
Ben Key
9785d95b98 Revisited my earlier fix for the following entry in etc/PROBLEMS: 'Emacs built on Windows 9x/ME crashes at startup on Windows XP, or Emacs builtpart of on XP crashes at startup on Windows 9x/ME.' Fixed several Windows API errors detected by BoundsChecker 2002-12-18 06:16:28 +00:00
Ben Key
f60ae425e9 Added a partial implementation of play-sound-internal for Windows. Fixed the following entry in etc/PROBLEMS: Emacs built on Windows 9x/ME crashes at startup on Windows XP, or Emacs built on XP crashes at startup on Windows 9x/ME. 2002-11-17 22:35:26 +00:00
Richard M. Stallman
6ed09cf020 (local_heap, local_alloc, local_free): New macros.
(malloc_widget_value, free_widget_value)
(w32_free_submenu_strings): Use them.

(push_submenu_start, push_submenu_end, push_left_right_boundary)
(push_menu_pane, push_menu_item, single_keymap_panes)
(single_menu_item, Fx_popup_menu, menubar_selection_callback)
(single_submenu, set_frame_menubar)
(w32_menu_show, w32_dialog_show): Use AREF, ASET, ASIZE.

(Fx_popup_menu):  Don't show pop up menu until preceding one is
actually cleaned up.  Moved UNGCPRO outside #ifdef HAVE_MENUS block.

Changes adapted from xmenu.c
(set_frame_menubar): First parse all submenus,
then make widget_value trees from them.
Don't allocate any widget_value objects
until we are done with the parsing.
(parse_single_submenu): New function.
(digest_single_submenu): New function.
(single_submenu): Function deleted, replaced by those two.
2002-08-05 16:33:44 +00:00
Ken Raeburn
d5db40779d Most uses of XSTRING combined with STRING_BYTES or indirection changed to
SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references
left unchanged for now.
2002-07-15 00:01:34 +00:00
Juanma Barranquero
aed1337830 Use macro SPECPDL_INDEX. 2002-07-11 14:18:02 +00:00
Pavel Janík
3b8f965153 Rename enum event_kind items. 2002-06-13 14:59:38 +00:00
Jason Rumney
71f6b29519 (menubar_selection_callback): Free the menu and
clear the menu_command_in_progress flag.
2002-02-23 00:01:34 +00:00
Jason Rumney
e6bb685beb Fix typo in last checkin 2002-01-08 19:33:24 +00:00
Jason Rumney
2d10309fea (single_submenu, set_frame_menubar, w32_menu_show):
(w32_dialog_show): Initialize wv->help to Qnil.
2002-01-07 00:26:57 +00:00
Jason Rumney
7f2cddf33b (w32_menu_display_help): Revert last change. 2002-01-06 21:39:33 +00:00
Jason Rumney
f884b6f49f (w32_menu_display_help): Hide any tooltip window. 2002-01-05 00:17:40 +00:00
Jason Rumney
37647b2dff (w32_free_submenu_strings): Clear menu item struct
before using.
2001-12-10 22:52:51 +00:00
Jason Rumney
d1fffd1db8 (_widget_value): Make `help' field a Lisp_Object. Add
comment to explain where the struct came from.
(single_submenu, w32_menu_show): Set `help' field as Lisp_Object.
(add_menu_item): Process pop-up menus first to avoid memory leak.
(add_menu_item, w32_menu_display_help): Use `help' field as
Lisp_Object.
(w32_free_submenu_strings): Only free owner-drawn strings.
2001-12-09 16:48:03 +00:00
Jason Rumney
ace9b2986c (current_popup_menu, get_menu_item_info):
(set_menu_item_info): New vars.
(set_frame_menubar): Doc fix clarifying GC interaction with menus.
(w32_menu_show): Set current_popup_menu.
(add_menu_item): Allocate new strings for owner-drawn menu items
and help strings.
Use owner-draw for disabled menu items again.
(w32_menu_display_help): Ignore owner-drawn items and popup menus.
(w32_free_submenu_strings, w32_free_menu_strings): New functions.
2001-12-01 11:16:54 +00:00
Andrew Innes
59a86c996c (w32_menu_display_help): Actually add the new argument
OWNER.
2001-11-28 22:25:51 +00:00
Jason Rumney
1c5acb8c6d (add_menu_item): Do not use owner-draw for disabled menu items.
From David Ponce <dponce@wanadoo.fr>.
(w32_dialog_show) [HAVE_DIALOGS]: Compile whole
function conditionally.
(w32_menu_display_help): New argument OWNER. Rewritten to store a
help event in the owner frame's keyboard buffer.
2001-11-28 20:31:43 +00:00
Jason Rumney
2cd2396094 (w32_menu_show, push_menu_pane): Doc fixes. 2001-11-18 22:01:13 +00:00
Jason Rumney
6f665da949 (add-menu-item): Make help_echo and radio buttons
work for most menu items.  From David Ponce
<david.ponce@wanadoo.fr>.
2001-11-15 22:53:54 +00:00
Jason Rumney
33f096701c Change doc-string comments to new style'. [w/doc:' keyword]. Doc fixes. 2001-11-12 23:57:09 +00:00
Pavel Janík
b782650360 Update usage of CHECK_ macros (remove unused second argument). 2001-11-02 20:46:55 +00:00
Stefan Monnier
b2123f8142 (Fx_popup_menu): Explicitly init f, xpos, and ypos.
(Fx_popup_dialog): Explicitly init f.
(w32_menu_display_help): Use empty_string.
2001-10-30 03:38:24 +00:00
Jason Rumney
292508513c (single_submenu, w32_menu_show) [!HAVE_MULTILINGUAL_MENU]:
Protect unibyte stings created by replacing their multibyte
equivalents in menu_items.
(w32_menu_show): Don't overwrite an item's name with its key
description in case the description is a multibyte string.
(single_submenu): Some cleanup.
2001-10-21 10:54:17 +00:00
Stefan Monnier
5ee707b8f1 (keymap_panes, Fx_popup_menu): Use Fkeymap_prompt. 2001-10-08 11:12:23 +00:00
Gerd Moellmann
32c82ac0a1 Don't define min/max. 2001-10-08 08:08:08 +00:00
Andrew Innes
c30dce3d22 (set_frame_menubar): Take into account that
f->menu_bar_vector can be nil, and not a vector.  From Ken Raeburn
<raeburn@gnu.org>.
2001-09-30 21:55:04 +00:00
Stefan Monnier
fe5a01629a (menubar_selection_callback, w32_menu_show): Initialize `entry' to nil.
(w32_dialog_show): Remove unused `save_wv' variable.
(name_is_separator): Recognize "--:foo" and "--foo-bar".
2001-07-11 18:31:41 +00:00
Andrew Innes
4cdf6a6cec (add_menu_item): Fix problems with using ownerdraw for
menu titles.
2001-03-08 21:21:44 +00:00
Jason Rumney
c53b6500e8 * w32menu.c (set_frame_menubar): Run activate-menu-bar-hook with
safe_run_hooks.
2001-02-23 10:15:27 +00:00
Jason Rumney
222456a1f0 (add_menu_item): Reset menu item text when changing type to radio button. 2000-11-28 20:28:02 +00:00
Stefan Monnier
020676925c * lisp.h (KEYMAPP): New macro.
(get_keymap): Remove.
(get_keymap_1): Rename get_keymap.
* keyboard.h (get_keymap_1, Fkeymapp): Remove prototype.
* xterm.c (note_mode_line_highlight): Use KEYMAPP.
* xmenu.c (single_submenu): Use KEYMAPP.
(Fx_popup_menu): Fetch keymaps rather than checking Fkeymapp.
Use KEYMAPP rather than Fkeymapp.
* w32term.c (note_mode_line_highlight): Use KEYMAPP.
* w32menu.c (True, False): Remove (use TRUE and FALSE instead).
(Fx_popup_menu): Fetch keymaps rather than checking Fkeymapp.
Use KEYMAPP rather than Fkeymapp.
(single_submenu): Use KEYMAPP.
(w32_menu_show, w32_dialog_show): Use TRUE.
* minibuf.c (Fread_from_minibuffer): Update call to get_keymap.
* keymap.c (KEYMAPP): Remove (moved to lisp.h).
(Fkeymapp): Use KEYMAPP.
(get_keymap): Rename from get_keymap_1.  Remove old def.
Return t when autoload=0 and error=0 and the keymap needs autoloading.
(Fcopy_keymap): Check (eq (car x) 'keymap) rather than using Fkeymapp.
(Fminor_mode_key_binding): Don't raise an error if the binding
is not a keymap.
(Fuse_global_map, Fuse_local_map): Allow autoloading.
(Faccessible_keymaps): Fetch keymaps rather than checking Fkeymapp.
* keyboard.c (read_char): get_keymap_1 -> get_keymap.
Allow Vspecial_event_map to be autoloaded.
(menu_bar_items): Fetch the keymap rather than using keymapp.
(menu_bar_one_keymap): No need to follow func-indirect any more.
(parse_menu_item): get_keymap_1 -> get_keymap.
(tool_bar_items): Fetch the keymap rather than using keymapp.
(read_key_sequence): Use KEYMAPP.
* intervals.c (get_local_map): Use get_keymap rather than following
function-indirections explicitly.
* doc.c (Fsubstitute_command_keys): get_keymap_1 -> get_keymap.
2000-10-27 22:20:19 +00:00
Jason Rumney
0b6bb67088 (add_menu_item): Do not use MF_OWNERDRAW for titles, as it has stopped working.
(Fx_popup_menu, Fx_popup_dialog): Check for tool-bar position like menu-bar.
2000-10-19 19:25:53 +00:00
Andrew Innes
15d36dee8f Include keyboard.h before frame.h. Fix compile
warnings.
2000-08-22 23:37:05 +00:00
Jason Rumney
e5cd3d111a (keymap_panes): Pass the keymap's prompt as the pane name to
single_keymap_panes.
(w32_menu_show): Set wv->title when dealing with titles.
(w32_menu_display_help): Call show_help_echo with OBJECT and POS.
2000-08-20 21:14:08 +00:00
Jason Rumney
86fb1a7902 (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.
2000-07-15 11:52:21 +00:00
Gerd Moellmann
205012787b (menubar_selection_callback): Use the `arg' slot of
input events to queue additional information, instead of consing.
2000-07-13 14:07:57 +00:00