Mercurial > emacs
comparison lwlib/xlwmenu.c @ 18993:c3bfd473a4d3
(display_menu): If an item is disabled,
don't display its submenu (if any).
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 26 Jul 1997 01:40:05 +0000 |
parents | 742a57e66f7d |
children | 38172783650b |
comparison
equal
deleted
inserted
replaced
18992:f0453e066438 | 18993:c3bfd473a4d3 |
---|---|
642 window_state* ws; | 642 window_state* ws; |
643 XPoint where; | 643 XPoint where; |
644 int horizontal_p = mw->menu.horizontal && (level == 0); | 644 int horizontal_p = mw->menu.horizontal && (level == 0); |
645 int highlighted_p; | 645 int highlighted_p; |
646 int just_compute_this_one_p; | 646 int just_compute_this_one_p; |
647 /* This is set nonzero if the element containing HIGHLIGHTED_POS | |
648 is disabled, so that we do not return any subsequent element either. */ | |
649 int no_return = 0; | |
647 | 650 |
648 if (level >= mw->menu.old_depth) | 651 if (level >= mw->menu.old_depth) |
649 abort (); | 652 abort (); |
650 | 653 |
651 if (level < mw->menu.old_depth - 1) | 654 if (level < mw->menu.old_depth - 1) |
686 } | 689 } |
687 | 690 |
688 if (hit | 691 if (hit |
689 && !*hit_return | 692 && !*hit_return |
690 && (horizontal_p ? hit->x < where.x : hit->y < where.y) | 693 && (horizontal_p ? hit->x < where.x : hit->y < where.y) |
691 && !all_dashes_p (val->name)) | 694 && !all_dashes_p (val->name) |
692 *hit_return = val; | 695 && !no_return) |
696 { | |
697 if (val->enabled) | |
698 *hit_return = val; | |
699 else | |
700 no_return = 1; | |
701 } | |
693 | 702 |
694 if (horizontal_p) | 703 if (horizontal_p) |
695 where.y = 0; | 704 where.y = 0; |
696 else | 705 else |
697 where.x = 0; | 706 where.x = 0; |