1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

71 Commits

Author SHA1 Message Date
Jan Djärv
1f5df1f783 * xlwmenu.c: Include xterm.h if emacs instead of declaring functions
used.
 (string_width): Declare as static.
 (Start, pop_up_menu): Set is_hint to 0 before calling
 handle_motion_event.
 (pop_up_menu): Return value and parameters for x_catch_errors and
 x_uncatch_errors changed.
2006-05-23 07:19:45 +00:00
Thien-Thi Nguyen
5b0d63bc36 Update years in copyright notice; nfc. 2006-02-05 23:44:47 +00:00
Dan Nicolaescu
43f15d4afe * xlwmenu.c (find_next_selectable):
(find_prev_selectable): Add missing parameter
declarations.

* xfaces.c (lookup_derived_face): Add parameter type.

* xdisp.c (cursor_row_fully_visible_p): Add parameter type.

* marker.c (verify_bytepos): Add parameter type.

* process.c (get_operating_system_release): Move prototype ...

* systime.h (get_operating_system_release): ... here.

* xterm.c (set_vertical_scroll_bar): Move prototype ...

* xterm.h: ... here.

* fns.c (internal_equal, seed_random): Fix prototypes.
(internal_equal): Add missing parameter.
2005-09-27 18:48:59 +00:00
Dan Nicolaescu
c5caf98146 Fix the return type for x_clear_errors and
x_uncatch_errors.
2005-09-24 20:37:14 +00:00
Thien-Thi Nguyen
92b47a4a99 Update years in copyright notice; nfc. 2005-08-07 10:56:27 +00:00
Lute Kamstra
364c38d3af Update FSF's address. 2005-07-04 15:47:28 +00:00
Jan Djärv
2015c054d9 * xlwmenu.c (string_width):
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Ditto.
(display_menu_item, make_drawing_gcs, XlwMenuInitialize)
(XlwMenuSetValues):  Use font if fontSet is NULL, use only
font for !HAVE_X_I18N.
(xlwMenuResources): Add fontSet resource.
2005-04-01 18:42:19 +00:00
Jan Djärv
e9c19b6818 Temporary #undef HAVE_X_I18N until FontSet for UTF-8
on XFree86 is investigated.
2005-03-22 21:41:27 +00:00
Stefan Monnier
15df8e8921 (MENU_FONT_ASCENT) [HAVE_X_I18N]: Try to be more correct. 2005-03-18 05:19:59 +00:00
Stefan Monnier
423a3f5901 Add support for I18N to Lucid menus.
* xlwmenuP.h (struct _XlwMenu_part) [HAVE_X_I18N]: Change `font' to be
a fontset.  Add a `font_extents' element.

* xlwmenu.c (xlwMenuResources) [HAVE_X_I18N]: Use a fontset for the
`font' resource.
(string_width) [HAVE_X_I18N]: Use XmbTextExtents;
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): New macros.
(arrow_width, toggle_button_width, size_menu_item, draw_arrow)
(draw_toggle, draw_radio, display_menu_item): Use them.
(display_menu_item) [HAVE_X_I18N]: Use XmbDrawString.
(make_drawing_gcs) [HAVE_X_I18N]: Don't mess with fonts.
(XlwMenuInitialize) [HAVE_X_I18N]: Initialize font_extents.
(XlwMenuSetValues) [HAVE_X_I18N]: Refresh font_extents if font changes.
2005-03-18 04:19:41 +00:00
Jan Djärv
4220b2a5ce * xlwmenu.c (xlwMenuActionsList): Install MenuGadgetEscape as an
action procedure for compatibility with Lesstif/Motif.

* Makefile.in (mostlyclean): Don't remove *~ on clean.
2004-12-27 15:22:36 +00:00
Jan Djärv
03a693b48a * xlwmenu.c (find_first_selectable, find_next_selectable)
(find_prev_selectable): Rename parameter skip_no_call_data to
skip_titles.  Recognize titles as having no call_data and no contents.
(Down, Up): Comment update.
2004-11-01 12:20:45 +00:00
Jan Djärv
244c93fe57 Changes for lucid popup menus (keyboard traversal enabled) and dialogs
(Xaw and Xm pop down on ESC).
2004-01-12 01:45:22 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Dave Love
404074e226 Include lisp.h, not ../src/lisp.h.
(make_drawing_gcs): Remove unused `xswa', `mask'.
2003-05-22 13:38:44 +00:00
Juanma Barranquero
177c0ea743 Trailing whitespace deleted. 2003-02-04 14:56:31 +00:00
Richard M. Stallman
fa74535d44 (pop_new_stack_if_no_contents): Do nothing if new_depth is 1.
(remap_menubar): Don't look in new_stack[0].
(Left): At level 1, do the same thing Right does.
2002-12-22 22:00:44 +00:00
Dave Love
8fdc938415 (separator_height): Prototype. 2002-11-20 19:19:14 +00:00
Pavel Janík
ef93458b2f (make_drawing_gcs): The scaling factor passed to
`x_alloc_lighter_color_for_widget' is a float, not an int, and it's
a multiplicative factor, so the name `delta' is inaccurate.  Always base
disabled foreground on the normal foreground.  Don't use the temporary
variable `temp'.
2002-05-07 05:22:48 +00:00
Pavel Janík
8b71a9ca6f (xlwMenuResources): New resource.
(find_next_selectable): Return current item when the menu is not poped up.
Rename `inactive_gc' to `disabled_gc'.
Use lighter/darker color for disabled menu items instead of using stipple.
Use stipple only when better color can not be determined automatically.
2002-05-06 18:56:25 +00:00
Pavel Janík
2376c841ac Change default values. 2002-04-29 09:10:28 +00:00
Jan Djärv
005e0d57fc Do not grab keyboard if installation-directory is
non-nil (not installed Emacs).  To simplify debugging.
2002-04-28 19:54:30 +00:00
Jan Djärv
4db7db7d55 Add calls to Grab/UngrabKeyboard to remove strange interactions with
window managers that steal keypresses.
2002-04-22 18:21:06 +00:00
Pavel Janík
1b8d91abb3 (find_next_selectable): New function.
(Down, Up, Right): Use it.
(find_next_selectable): Prevent endless loops when only one item is enabled
in the menu.
2002-04-20 13:39:57 +00:00
Pavel Janík
a7e19a2674 (xlwMenuTranslations, xlwMenuActionsList): Add translations for cursor keys
and RET.
(find_next_selectable, find_prev_selectable): New functions used for
finding menu-items.
(Down, Up, Left, Right): New functions.
2002-04-19 18:56:51 +00:00
Richard M. Stallman
2f96293d69 Include ../src/lisp.h. 2001-12-02 05:00:27 +00:00
Gerd Moellmann
2a692ba46f (xlwmenu_window_p): New function. 2001-04-30 14:34:54 +00:00
Dave Love
5916243b18 (gray_bitmap_bits): Remove `unsigned' from
declaration.
2000-12-14 14:11:03 +00:00
Dave Love
2f90328f39 (draw_separator) <SEPARATOR_SHADOW_ETCHED_IN_DASH>:
<SEPARATOR_SHADOW_ETCHED_OUT_DASH>: Fix call of draw_separator.
2000-12-11 14:33:47 +00:00
Gerd Moellmann
f3c9e54407 (xlwmenu_redisplay): New function. 2000-11-21 22:27:08 +00:00
Sam Steingold
5c520e0aba * xlwmenu.c: Before including <X11/Xos.h> on SUN, define SUNOS41
to avoid redefining struct timeval and struct timezone.
2000-09-28 20:30:52 +00:00
Miles Bader
b7fa4a0675 (remap_menubar):
Only include the menu-margin in the initial X & Y positions for
  horizontal menu-bars.
(fit_to_screen):
  If moving a sub-menu to the left-side, increment its x-position by the
  shadow-thickness to make it look more attached to the invoking
  menu-item (similarly to the way it would be displayed on the right side).
2000-09-04 13:04:49 +00:00
Miles Bader
43aa2f1bef (XlwMenuSetValues): Pass the correct pointer type to XtIsRealized. 2000-09-04 12:13:34 +00:00
Miles Bader
da353f232d (XlwMenuSetValues): Only frob the display if the menu is actually displayed. 2000-09-04 11:55:02 +00:00
Miles Bader
65c0ae0523 (x_alloc_lighter_color_for_widget):
New extern declaration.
(make_shadow_gcs) [emacs]:
  Use x_alloc_lighter_color_for_widget to do shadow calculation.
(make_shadow_gcs):
  Remove code that tests whether the top shadow is dimmer than the bottom
    shadow--it shouldn't ever happen.
2000-09-03 11:37:45 +00:00
Miles Bader
90c7e9f079 (XlwMenuSetValues):
If the background color has changed, re-make the shadow-gcs too.
2000-08-30 11:52:37 +00:00
Gerd Moellmann
f1c16db4be Don't include <X11/bitmaps/gray> because that
leads to redefinition errors when static is defined as empty in
config.h.  Refer to the gray bitmap in xfns.c, instead.
2000-07-19 15:49:28 +00:00
Gerd Moellmann
bba2a92393 (make_shadow_gcs): Set free_top_shadow_color_p
and free_top_shadow_color_p flags in the menu widget if
top and bottom shadow colors must be freed.
(release_shadow_gcs): Free colors only if they must be freed.
2000-06-16 18:34:17 +00:00
Gerd Moellmann
fc8fefedf3 (make_shadow_gcs): Free and copy colors so that
color reference counts are right.
(release_shadow_gcs): Free colors.
2000-06-12 19:12:11 +00:00
Dave Love
a57a160552 (x_alloc_nearest_color_for_widget, x_catch_errors, x_uncatch_errors)
(x_had_errors_p, x_clear_errors): Add prototypes -- should be moved
into separate header.
(make_shadow_gcs) <x_alloc_nearest_color_for_widget>: Cast first arg.
(Start) <pop_up_menu>: Cast second arg.
2000-06-06 14:21:15 +00:00
Gerd Moellmann
b0404f9ffc (make_shadow_gcs): Use the widget's colormap instead
of the screen's default colormap.
2000-03-04 16:04:00 +00:00
Gerd Moellmann
d6fd637121 (xlwMenuResources): All XtNhighlightCallback.
(remap_menubar): Call highlight callback.
2000-01-17 09:10:58 +00:00
Paul Eggert
0f0912e644 Add support for large files, plus some locale improvements.
* dispatch.c, lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib.c, xlwmenu.c,
xrdb-cpp.c, xrdb.c:
Include <config.h> before any system include files.

* lwlib-Xm.c, lwlib.c:
Do not include <stdlib.h> or <string.h>, as <config.h> does this.
1999-10-19 07:21:16 +00:00
Gerd Moellmann
dd7447ccb0 (make_shadow_gcs): Call
x_alloc_nearest_color_for_widget.
1999-09-03 18:49:53 +00:00
Gerd Moellmann
be06a3dffa (make_shadow_gcs) ]emacs]: Use x_alloc_nearest_color.
(all_dashes_p): Removed.
(size_menu_item): Call lw_separator_p.
(display_menu_item): Ditto.
(display_menu): Ditto.
(draw_separator): New.
(display_menu_item): Call it.
(separator_height): New.
(size_menu_item): Call it.
(abort_gracefully): New.
(display_menu): Use it instead of abort.
(size_menu): Ditto.
(xlwMenuResources): Change previously unused
XtNmargin to 4.
(size_menu): Take margin into account.
(display_menu_item): Ditto.
(remap_menubar): Ditto.
(draw_arrow): Draw it 3D.
(radio_button_width): New.
(size_menu_item): Use new functions.
(draw_shadow_rhombus): New.
(draw_radio): Use radio_button_width and draw_shadow_rhombus.
(draw_toggle): Use toggle_button_width.
(size_menu_item): Add parameter button_width.
(size_menu): Compute button_width.
(toggle_button_width): New.
(draw_toggle): New.
(draw_radio): New.
(draw_shadow_rectangle): Add parameter `down_p'.
1999-07-21 21:43:52 +00:00
Richard M. Stallman
4f08464cb8 (motion_event_is_in_menu): Extend the left and
top windows by the shadow width.
1997-09-20 04:48:29 +00:00
Richard M. Stallman
ccc1cac016 (display_menu): If an item is disabled,
don't display its submenu (if any).
1997-07-26 01:40:05 +00:00
Richard M. Stallman
5efb61c794 (pop_up_menu): Update the call to x_catch_errors. 1997-05-02 07:27:07 +00:00
Richard M. Stallman
1ba46f7d63 (enriched-translations): Add top' and choice' everywhere so that *
can be entered.
(custom-face-attributes): Don't use top-line'.
(mode-line-format): Replace (:eval mode-line-mode-name)'.
(mode-line-mode-name): New.
(make-mode-line-mouse-sensitive): Don't change default value
of x' are found before files starting with down_p'.
1997-01-22 02:04:17 +00:00
Karl Heuer
1fb87c7784 Fix FSF address in comment. 1996-07-20 18:10:35 +00:00