/[emacs]/emacs/src/w32menu.c
ViewVC logotype

Diff of /emacs/src/w32menu.c

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

revision 1.57 by lektu, Thu Jul 11 14:16:14 2002 UTC revision 1.58 by raeburn, Mon Jul 15 00:00:37 2002 UTC
# Line 518  single_menu_item (key, item, pending_map Line 518  single_menu_item (key, item, pending_map
518    enabled = XVECTOR (item_properties)->contents[ITEM_PROPERTY_ENABLE];    enabled = XVECTOR (item_properties)->contents[ITEM_PROPERTY_ENABLE];
519    item_string = XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME];    item_string = XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME];
520    
521    if (!NILP (map) && XSTRING (item_string)->data[0] == '@')    if (!NILP (map) && SREF (item_string, 0) == '@')
522      {      {
523        if (!NILP (enabled))        if (!NILP (enabled))
524          /* An enabled separate pane. Remember this to handle it later.  */          /* An enabled separate pane. Remember this to handle it later.  */
# Line 1201  single_submenu (item_key, item_name, map Line 1201  single_submenu (item_key, item_name, map
1201              }              }
1202  #endif  #endif
1203            pane_string = (NILP (pane_name)            pane_string = (NILP (pane_name)
1204                           ? "" : (char *) XSTRING (pane_name)->data);                           ? "" : (char *) SDATA (pane_name));
1205            /* If there is just one top-level pane, put all its items directly            /* If there is just one top-level pane, put all its items directly
1206               under the top-level menu.  */               under the top-level menu.  */
1207            if (menu_items_n_panes == 1)            if (menu_items_n_panes == 1)
# Line 1265  single_submenu (item_key, item_name, map Line 1265  single_submenu (item_key, item_name, map
1265            else            else
1266              save_wv->contents = wv;              save_wv->contents = wv;
1267    
1268            wv->name = (char *) XSTRING (item_name)->data;            wv->name = (char *) SDATA (item_name);
1269            if (!NILP (descrip))            if (!NILP (descrip))
1270              wv->key = (char *) XSTRING (descrip)->data;              wv->key = (char *) SDATA (descrip);
1271            wv->value = 0;            wv->value = 0;
1272            /* The EMACS_INT cast avoids a warning.  There's no problem            /* The EMACS_INT cast avoids a warning.  There's no problem
1273               as long as pointers have enough bits to hold small integers.  */               as long as pointers have enough bits to hold small integers.  */
# Line 1448  set_frame_menubar (f, first_time, deep_p Line 1448  set_frame_menubar (f, first_time, deep_p
1448            string = XVECTOR (items)->contents[i + 1];            string = XVECTOR (items)->contents[i + 1];
1449            if (NILP (string))            if (NILP (string))
1450              break;              break;
1451            wv->name = (char *) XSTRING (string)->data;            wv->name = (char *) SDATA (string);
1452            wv = wv->next;            wv = wv->next;
1453          }          }
1454    
# Line 1471  set_frame_menubar (f, first_time, deep_p Line 1471  set_frame_menubar (f, first_time, deep_p
1471              break;              break;
1472    
1473            wv = xmalloc_widget_value ();            wv = xmalloc_widget_value ();
1474            wv->name = (char *) XSTRING (string)->data;            wv->name = (char *) SDATA (string);
1475            wv->value = 0;            wv->value = 0;
1476            wv->enabled = 1;            wv->enabled = 1;
1477            wv->button_type = BUTTON_TYPE_NONE;            wv->button_type = BUTTON_TYPE_NONE;
# Line 1662  w32_menu_show (f, x, y, for_click, keyma Line 1662  w32_menu_show (f, x, y, for_click, keyma
1662              }              }
1663  #endif  #endif
1664            pane_string = (NILP (pane_name)            pane_string = (NILP (pane_name)
1665                           ? "" : (char *) XSTRING (pane_name)->data);                           ? "" : (char *) SDATA (pane_name));
1666            /* If there is just one top-level pane, put all its items directly            /* If there is just one top-level pane, put all its items directly
1667               under the top-level menu.  */               under the top-level menu.  */
1668            if (menu_items_n_panes == 1)            if (menu_items_n_panes == 1)
# Line 1727  w32_menu_show (f, x, y, for_click, keyma Line 1727  w32_menu_show (f, x, y, for_click, keyma
1727              prev_wv->next = wv;              prev_wv->next = wv;
1728            else            else
1729              save_wv->contents = wv;              save_wv->contents = wv;
1730            wv->name = (char *) XSTRING (item_name)->data;            wv->name = (char *) SDATA (item_name);
1731            if (!NILP (descrip))            if (!NILP (descrip))
1732              wv->key = (char *) XSTRING (descrip)->data;              wv->key = (char *) SDATA (descrip);
1733            wv->value = 0;            wv->value = 0;
1734            /* Use the contents index as call_data, since we are            /* Use the contents index as call_data, since we are
1735               restricted to 16-bits.  */               restricted to 16-bits.  */
# Line 1773  w32_menu_show (f, x, y, for_click, keyma Line 1773  w32_menu_show (f, x, y, for_click, keyma
1773        if (STRING_MULTIBYTE (title))        if (STRING_MULTIBYTE (title))
1774          title = ENCODE_SYSTEM (title);          title = ENCODE_SYSTEM (title);
1775  #endif  #endif
1776        wv_title->name = (char *) XSTRING (title)->data;        wv_title->name = (char *) SDATA (title);
1777        wv_title->enabled = TRUE;        wv_title->enabled = TRUE;
1778        wv_title->title = TRUE;        wv_title->title = TRUE;
1779        wv_title->button_type = BUTTON_TYPE_NONE;        wv_title->button_type = BUTTON_TYPE_NONE;
# Line 1906  w32_dialog_show (f, keymaps, title, erro Line 1906  w32_dialog_show (f, keymaps, title, erro
1906      pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME];      pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME];
1907      prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX];      prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX];
1908      pane_string = (NILP (pane_name)      pane_string = (NILP (pane_name)
1909                     ? "" : (char *) XSTRING (pane_name)->data);                       ? "" : (char *) SDATA (pane_name));  
1910      prev_wv = xmalloc_widget_value ();      prev_wv = xmalloc_widget_value ();
1911      prev_wv->value = pane_string;      prev_wv->value = pane_string;
1912      if (keymaps && !NILP (prefix))      if (keymaps && !NILP (prefix))
# Line 1955  w32_dialog_show (f, keymaps, title, erro Line 1955  w32_dialog_show (f, keymaps, title, erro
1955          prev_wv->next = wv;          prev_wv->next = wv;
1956          wv->name = (char *) button_names[nb_buttons];          wv->name = (char *) button_names[nb_buttons];
1957          if (!NILP (descrip))          if (!NILP (descrip))
1958            wv->key = (char *) XSTRING (descrip)->data;            wv->key = (char *) SDATA (descrip);
1959          wv->value = (char *) XSTRING (item_name)->data;          wv->value = (char *) SDATA (item_name);
1960          wv->call_data = (void *) &XVECTOR (menu_items)->contents[i];          wv->call_data = (void *) &XVECTOR (menu_items)->contents[i];
1961          wv->enabled = !NILP (enable);          wv->enabled = !NILP (enable);
1962          wv->help = Qnil;          wv->help = Qnil;

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

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