diff lwlib/xlwmenu.c @ 90043:e24e2e78deda

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-69 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-655 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-656 Update from CVS: lisp/man.el (Man-xref-normal-file): Fix help-echo. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-657 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-658 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-659 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-661 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-667 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-68 Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 04 Nov 2004 08:55:40 +0000
parents 68c22ea6027c 2c65a9fc7dec
children 95879cc1ed20
line wrap: on
line diff
--- a/lwlib/xlwmenu.c	Fri Oct 29 00:25:02 2004 +0000
+++ b/lwlib/xlwmenu.c	Thu Nov 04 08:55:40 2004 +0000
@@ -2054,26 +2054,26 @@
 }
 
 static widget_value *
-find_first_selectable (mw, item, skip_no_call_data)
+find_first_selectable (mw, item, skip_titles)
      XlwMenuWidget mw;
      widget_value *item;
-     int skip_no_call_data;
+     int skip_titles;
 {
   widget_value *current = item;
   enum menu_separator separator;
 
   while (lw_separator_p (current->name, &separator, 0) || !current->enabled
-         || (skip_no_call_data && !current->call_data))
+         || (skip_titles && !current->call_data && !current->contents))
     if (current->next)
       current=current->next;
     else
-	return NULL;
+      return NULL;
 
   return current;
 }
 
 static widget_value *
-find_next_selectable (mw, item, skip_no_call_data)
+find_next_selectable (mw, item, skip_titles)
      XlwMenuWidget mw;
      widget_value *item;
 {
@@ -2082,7 +2082,7 @@
 
   while (current->next && (current=current->next) &&
 	 (lw_separator_p (current->name, &separator, 0) || !current->enabled
-          || (skip_no_call_data && !current->call_data)))
+          || (skip_titles && !current->call_data && !current->contents)))
     ;
 
   if (current == item)
@@ -2093,7 +2093,8 @@
 
       while (lw_separator_p (current->name, &separator, 0)
              || !current->enabled
-             || (skip_no_call_data && !current->call_data))
+             || (skip_titles && !current->call_data
+                 && !current->contents))
 	{
 	  if (current->next)
 	    current=current->next;
@@ -2108,14 +2109,14 @@
 }
 
 static widget_value *
-find_prev_selectable (mw, item, skip_no_call_data)
+find_prev_selectable (mw, item, skip_titles)
      XlwMenuWidget mw;
      widget_value *item;
 {
   widget_value *current = item;
   widget_value *prev = item;
 
-  while ((current=find_next_selectable (mw, current, skip_no_call_data))
+  while ((current=find_next_selectable (mw, current, skip_titles))
          != item)
     {
       if (prev == current)
@@ -2141,8 +2142,7 @@
   if (mw->menu.old_depth == mw->menu.top_depth)
     /* When <down> in the menu-bar is pressed, display the corresponding
        sub-menu and select the first selectable menu item there.
-       If this is a popup menu, skip items with zero call data (title of
-       the popup).  */
+       If this is a popup menu, skip title item of the popup.  */
     set_new_state (mw,
                    find_first_selectable (mw,
                                           selected_item->contents,
@@ -2174,8 +2174,7 @@
 	 last selectable item in the list.  So we select the first
 	 selectable one and find the previous selectable item.  Is there
 	 a better way?  */
-      /* If this is a popup menu, skip items with zero call data (title of
-         the popup).  */
+      /* If this is a popup menu, skip title item of the popup.  */
       set_new_state (mw,
                      find_first_selectable (mw,
                                             selected_item->contents,