summaryrefslogtreecommitdiff
path: root/src/xmenu.c
Commit message (Collapse)AuthorAgeFilesLines
* (Fx_popup_menu): Doc fix.Luc Teirlinck2005-05-021-3/+6
|
* [not HAVE_X_TOOLKIT] (xmenu_show):Richard M. Stallman2005-05-011-2/+5
| | | | If user cancels the menu, quit unless FOR_CLICK.
* (Fx_popup_menu): Initialize error_name to NULL.Thien-Thi Nguyen2005-04-181-1/+1
|
* Remove eol whitespace; nfc.Thien-Thi Nguyen2005-04-181-4/+4
|
* * xmenu.c (create_and_show_popup_menu): Just remove menu and returnJan Djärv2005-03-241-5/+8
| | | | | if it failed to pop up (Gnome "show pointer on ctrl" option makes menus fail to pop up).
* (ENCODE_MENU_STRING) [HAVE_X_I18N]: Use ENCODE_SYSTEM.Stefan Monnier2005-03-171-0/+2
|
* (ENCODE_MENU_STRING): Explicitly use string_make_unibyte.Stefan Monnier2005-03-121-24/+19
| | | | | (list_of_panes, list_of_items, Fx_popup_menu): Use XCAR/XCDR. (digest_single_submenu, xmenu_show): Use ENCODE_MENU_STRING.
* Forgot to remove debug code.Jan Djärv2005-02-031-2/+0
|
* * xmenu.c (menubar_selection_callback): Force out GTK bufferedJan Djärv2005-02-031-3/+16
| | | | | | events so the menu event comes after them. This is to prevent sit-for from exiting on buffered events directly after a menu selection, lisp code for Help => About Emacs uses sit-for.
* * xmenu.c (create_and_show_popup_menu): Pass zero as button toJan Djärv2005-01-071-5/+9
| | | | gtk_menu_popup if not for_click, so callbacks for the menu are called.
* (popup_get_selection): Remove parameter down_on_keypress.Jan Djärv2004-12-271-8/+4
| | | | | (create_and_show_popup_menu, create_and_show_dialog): Remove parameter down_on_keypress to popup_get_selection.
* * xmenu.c (popup_get_selection): Only pop down dialogsJan Djärv2004-12-271-12/+3
| | | | on C-g and Escape.
* Indentation fix.Richard M. Stallman2004-12-271-1/+1
|
* * xmenu.c (popup_get_selection): Pop down on C-g.Jan Djärv2004-12-271-0/+20
| | | | | | | | | | | | | | (set_frame_menubar): Install translations for Lucid/Motif/Lesstif that pops down menu on C-g. (xdialog_show): If dialog popped down and no button in the dialog was pushed, call Fsignal to quit. (xmenu_show): In no toolkit version, if menu returns NO_SELECT call Fsignal to quit. * xfns.c (Fx_file_dialog): Motif/Lesstif version: Pop down on C-g. * gtkutil.c (xg_initialize): Install bindings for C-g so that dialogs and menus pop down.
* * xmenu.c (Fx_popup_menu): Correct documentation about position.Jan Djärv2004-12-071-29/+19
| | | | | | (xmenu_show): Do not call XTranslateCoordinates. Adjust position if not given by a mouse click to correspond with x-popup-menu documentation.
* * xmenu.c (x_menu_in_use): Removed.Jan Djärv2004-11-161-8/+1
| | | | | | | | | (x_menu_set_in_use): Also set popup_activated_flag. * xfns.c (Fx_file_dialog): Call popup_activated instead of x_menu_in_use. Call x_menu_set_in_use in Motif version also. * xterm.h: (x_menu_in_use): Removed.
* Removed fprintfJan Djärv2004-11-141-1/+0
|
* * xmenu.c (pop_down_menu): Remove global variable current_menu,Jan Djärv2004-11-141-31/+24
| | | | | | | extract pointer from arg with XSAVE_VALUE. (create_and_show_popup_menu, create_and_show_dialog, xmenu_show): Construct arg to record_unwind_protect with make_save_value.
* * xfns.c (Fx_file_dialog): Call x_menu_in_use and x_menu_set_in_use.Jan Djärv2004-11-131-1/+18
| | | | | | | | | Record unwind with clean_up_file_dialog. * xterm.h: Declare x_menu_in_use, x_menu_set_in_use, x_menu_wait_for_event. * xmenu.c (x_menu_in_use, x_menu_set_in_use): New functions.
* * xmenu.c (unuse_menu_items, pop_down_menu): Arg is of typeJan Djärv2004-11-131-80/+105
| | | | | | | | | | | | | Lisp_Object. (popup_get_selection): Move unwind protect ... (create_and_show_popup_menu, create_and_show_dialog): ... to here. Move destroy of widget to pop_down_menu. (popup_widget_loop): Move unwind protect ... (create_and_show_popup_menu, create_and_show_dialog): ... to here. Move destroy of widget to pop_down_menu. (pop_down_menu): BLOCK_INPUT and destroy widget/window. (xmenu_show): record unwind pop_down_menu. Move XMenuDestroy, x_mouse_leave and grabbed = 0 to pop_down_menu.
* (pop_down_menu): Return nil.Kim F. Storm2004-11-121-3/+5
|
* (pop_down_menu): New function.Jan Djärv2004-11-121-5/+39
| | | | | | | | (popup_get_selection, popup_widget_loop): Unwind protect to pop_down_menu. (popup_widget_loop): Add argument widget. (create_and_show_popup_menu, create_and_show_dialog): Pass new argument widget to popup_widget_loop.
* (popup_widget_loop): Add argument do_timers.Jan Djärv2004-11-121-2/+2
| | | | | | | (create_and_show_popup_menu, create_and_show_dialog): Pass 1 for do_timers to popup_widget_loop. (create_and_show_popup_menu): Pass 1 for do_timers to popup_get_selection.
* * xmenu.c (x_menu_wait_for_event): New function.Jan Djärv2004-11-121-10/+68
| | | | | | | (popup_get_selection, popup_widget_loop): Call x_menu_wait_for_event to handle timers. (xmenu_show): Call XMenuActivateSetWaitFunction so that x_menu_wait_for_event is called by XMenuActivate.
* * eval.c (Feval): Remove check for INPUT_BLOCKED_P.Jan Djärv2004-11-061-10/+13
| | | | | * xmenu.c (popup_get_selection, create_and_show_popup_menu) (create_and_show_dialog): Revert change from 2004-10-31.
* Comment change.Richard M. Stallman2004-11-041-1/+5
|
* * xmenu.c: Add prototypes for forward function declarations.Jan Djärv2004-10-311-15/+9
| | | | | | | (popup_get_selection): Remove parameter do_timers, remove call to timer_check. (create_and_show_popup_menu, create_and_show_dialog): Remove parameter do_timers from call to popup_get_selection.
* (update_submenu_strings): YAILOM.Stefan Monnier2004-09-071-4/+4
| | | | (set_frame_menubar): Make sure last_i is initialized.
* Fix typo in comment string.Jan Djärv2004-08-301-1/+1
|
* Don't call ENCODE_MENU_STRING on top level menu names, GC may occur.Jan Djärv2004-08-301-2/+2
|
* * xmenu.c (digest_single_submenu): Set lname and lkey in widget_valueJan Djärv2004-08-301-13/+46
| | | | | | | | | | instead of name and key. (update_submenu_strings): New function. (set_frame_menubar): Remove call to inhibit_garbage_collection, call update_submenu_strings. Call ENCODE_MENU_STRING for top level menu names. * gtkutil.h (_widget_value): Added lname and lkey.
* * xmenu.c (set_frame_menubar): Reintroduce inhibit_garbage_collectionJan Djärv2004-08-271-0/+1
| | | | from 2002-07-15T00:01:34Z!raeburn@raeburn.org so that strings from ENCODE_UTF_8 isn't GC:ed before used.
* * xmenu.c (popup_get_selection): Check new parameter down_on_keypressJan Djärv2004-01-121-7/+15
| | | | | | | | | if a key press should pop down. Only pop down if a key is pressed outside the menu/dialog. (create_and_show_popup_menu): Pass 0 for down_on_keypress to popup_get_selection. (create_and_show_dialog): Pass 1 for down_on_keypress to popup_get_selection.
* * xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons areJan Djärv2004-01-081-0/+6
| | | | specified.
* (show_help_event): Remove unused code.Kim F. Storm2003-12-271-2/+2
|
* Implement multiple display handling for GTK.Jan Djärv2003-11-161-3/+4
|
* Remove tear off capability for GTK popup menus.Jan Djärv2003-11-021-6/+8
| | | | | Since the context in Lisp is not present anymore, we don't know how to invoke the action for a menu item.
* Add arch taglinesMiles Bader2003-09-011-0/+3
|
* (find_and_call_menu_selection): Don't pass uninitializedStefan Monnier2003-06-151-0/+1
| | | | data to kbd_buffer_store_event.
* (ENCODE_MENU_STRING): New.Dave Love2003-06-021-9/+28
| | | | | (list_of_panes, list_of_items, digest_single_submenu, xmenu_show): Use it.
* Make (some) trivial substitutions for renamed andKim F. Storm2003-05-241-16/+12
| | | | new macros in dispextern.h, frame.h and window.h.
* (single_menu_item): Change last parameter to void* toAndreas Schwab2003-05-101-4/+5
| | | | avoid warning.
* (struct skp): New struct, to pass args through map_keymap.Stefan Monnier2003-05-041-57/+45
| | | | | (single_keymap_panes): Use it and map_keymap. (single_menu_item): Use skp as well.
* xterm.c (x_make_frame_visible): Call gtk_window_deiconify.Jan Djärv2003-02-081-3/+18
| | | | | xmenu.c (menu_position_func): Adjust menu popup position so that the menu is fully visible.
* Trailing whitespace deleted.Juanma Barranquero2003-02-041-66/+66
|
* GTK versionJan Djärv2003-01-191-160/+538
|
* (mouse_position_for_popup): New function.Jan Djärv2003-01-181-37/+81
| | | | | (Fx_popup_menu): Call mouse_position_for_popup for X and mouse_position_hook for others.
* (Fx_popup_menu): If popping up at mouse position,Jan Djärv2003-01-081-152/+88
| | | | | | | | call XQueryPointer to get coordinates. (popup_get_selection): Do not set popup_activated_flag to zero, let popup_deactivate_callback do that. Needed for Motif. Call x_dispatch_event instead of XtDispatchEvent. (xmenu_show): Calculate root coordinate from frame top/left position.
* (parse_single_submenu): Use individual keymap's promptRichard M. Stallman2002-12-231-6/+15
| | | | | | 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.
* (popup_get_selection): Now static. New arg DO_TIMERS.Richard M. Stallman2002-12-211-32/+86
| | | | | | | | | | | If it is non-nil, run timers. Use an unwind-protect to requeue the events that were read ahead. (popup_get_selection_unwind): New subroutine. (popup_get_selection_queue): File-scope variable now holds that queue. (xmenu_show): Pass 0 for DO_TIMERS to popup_get_selection. (xdialog_show): Pass 1 for DO_TIMERS to popup_get_selection. Use an unwind-protect to pop down the dialog box. (xdialog_show_unwind): New subroutine implements that.