/[emacs]/emacs/lwlib/xlwmenu.c
ViewVC logotype

Diff of /emacs/lwlib/xlwmenu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.53 by pj, Tue May 7 05:22:29 2002 UTC revision 1.53.2.1 by miles, Fri Apr 4 06:20:42 2003 UTC
# Line 196  static void Right(); Line 196  static void Right();
196  static void Select();  static void Select();
197  static void Key();  static void Key();
198  static void Nothing();  static void Nothing();
199  static int separator_height ();  static int separator_height __P ((enum menu_separator));
200    
201  static XtActionsRec  static XtActionsRec
202  xlwMenuActionsList [] =  xlwMenuActionsList [] =
# Line 316  static void Line 316  static void
316  pop_new_stack_if_no_contents (mw)  pop_new_stack_if_no_contents (mw)
317       XlwMenuWidget mw;       XlwMenuWidget mw;
318  {  {
319    if (mw->menu.new_depth)    if (mw->menu.new_depth > 1)
320      {      {
321        if (!mw->menu.new_stack [mw->menu.new_depth - 1]->contents)        if (!mw->menu.new_stack [mw->menu.new_depth - 1]->contents)
322          mw->menu.new_depth -= 1;          mw->menu.new_depth -= 1;
# Line 1243  xlwmenu_window_p (w, window) Line 1243  xlwmenu_window_p (w, window)
1243  {  {
1244    XlwMenuWidget mw = (XlwMenuWidget) w;    XlwMenuWidget mw = (XlwMenuWidget) w;
1245    int i;    int i;
1246      
1247    for (i = 0; i < mw->menu.windows_length; ++i)    for (i = 0; i < mw->menu.windows_length; ++i)
1248      if (window == mw->menu.windows[i].window)      if (window == mw->menu.windows[i].window)
1249        break;        break;
# Line 1397  remap_menubar (mw) Line 1397  remap_menubar (mw)
1397    
1398    /* unmap the menus that popped down */    /* unmap the menus that popped down */
1399    for (i = new_depth - 1; i < old_depth; i++)    for (i = new_depth - 1; i < old_depth; i++)
1400      if (i >= new_depth || !new_stack[i]->contents)      if (i >= new_depth || (i > 0 && !new_stack[i]->contents))
1401        XUnmapWindow (XtDisplay (mw), windows[i].window);        XUnmapWindow (XtDisplay (mw), windows[i].window);
1402  }  }
1403    
# Line 2184  Left (w, ev, params, num_params) Line 2184  Left (w, ev, params, num_params)
2184         the menu-bar. If the current item is the first one, highlight the         the menu-bar. If the current item is the first one, highlight the
2185         last item in the menubar (probably Help).  */         last item in the menubar (probably Help).  */
2186      set_new_state (mw, find_prev_selectable (mw, selected_item), mw->menu.old_depth - 1);      set_new_state (mw, find_prev_selectable (mw, selected_item), mw->menu.old_depth - 1);
2187      else if (mw->menu.old_depth == 1
2188               && selected_item->contents)     /* Is this menu item expandable?  */
2189        {
2190          set_new_state (mw, selected_item->contents, mw->menu.old_depth);
2191          remap_menubar (mw);
2192          selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
2193          if (!selected_item->enabled && find_first_selectable (mw, selected_item))
2194            set_new_state (mw, find_first_selectable (mw, selected_item), mw->menu.old_depth - 1);
2195        }
2196    
2197    else    else
2198      {      {
2199        pop_new_stack_if_no_contents (mw);        pop_new_stack_if_no_contents (mw);

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.53.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26