emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/macmenu.c


From: Ken Raeburn
Subject: [Emacs-diffs] Changes to emacs/src/macmenu.c
Date: Sun, 14 Jul 2002 20:00:53 -0400

Index: emacs/src/macmenu.c
diff -c emacs/src/macmenu.c:1.4 emacs/src/macmenu.c:1.5
*** emacs/src/macmenu.c:1.4     Thu Jul 11 10:13:34 2002
--- emacs/src/macmenu.c Sun Jul 14 20:00:36 2002
***************
*** 541,547 ****
    enabled = XVECTOR (item_properties)->contents[ITEM_PROPERTY_ENABLE];
    item_string = XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME]; 
  
!   if (!NILP (map) && XSTRING (item_string)->data[0] == '@')
      {
        if (!NILP (enabled))
        /* An enabled separate pane. Remember this to handle it later.  */
--- 541,547 ----
    enabled = XVECTOR (item_properties)->contents[ITEM_PROPERTY_ENABLE];
    item_string = XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME]; 
  
!   if (!NILP (map) && SREF (item_string, 0) == '@')
      {
        if (!NILP (enabled))
        /* An enabled separate pane. Remember this to handle it later.  */
***************
*** 1223,1229 ****
            }
  #endif
          pane_string = (NILP (pane_name)
!                        ? "" : (char *) XSTRING (pane_name)->data);
          /* If there is just one top-level pane, put all its items directly
             under the top-level menu.  */
          if (menu_items_n_panes == 1)
--- 1223,1229 ----
            }
  #endif
          pane_string = (NILP (pane_name)
!                        ? "" : (char *) SDATA (pane_name));
          /* If there is just one top-level pane, put all its items directly
             under the top-level menu.  */
          if (menu_items_n_panes == 1)
***************
*** 1287,1295 ****
          else
            save_wv->contents = wv;
  
!         wv->name = (char *) XSTRING (item_name)->data;
          if (!NILP (descrip))
!           wv->key = (char *) XSTRING (descrip)->data;
          wv->value = 0;
          /* The EMACS_INT cast avoids a warning.  There's no problem
             as long as pointers have enough bits to hold small integers.  */
--- 1287,1295 ----
          else
            save_wv->contents = wv;
  
!         wv->name = (char *) SDATA (item_name);
          if (!NILP (descrip))
!           wv->key = (char *) SDATA (descrip);
          wv->value = 0;
          /* The EMACS_INT cast avoids a warning.  There's no problem
             as long as pointers have enough bits to hold small integers.  */
***************
*** 1470,1476 ****
          string = XVECTOR (items)->contents[i + 1];
          if (NILP (string))
            break;
!         wv->name = (char *) XSTRING (string)->data;
          wv = wv->next;
        }
  
--- 1470,1476 ----
          string = XVECTOR (items)->contents[i + 1];
          if (NILP (string))
            break;
!         wv->name = (char *) SDATA (string);
          wv = wv->next;
        }
  
***************
*** 1493,1499 ****
            break;
  
          wv = xmalloc_widget_value ();
!         wv->name = (char *) XSTRING (string)->data;
          wv->value = 0;
          wv->enabled = 1;
          wv->button_type = BUTTON_TYPE_NONE;
--- 1493,1499 ----
            break;
  
          wv = xmalloc_widget_value ();
!         wv->name = (char *) SDATA (string);
          wv->value = 0;
          wv->enabled = 1;
          wv->button_type = BUTTON_TYPE_NONE;
***************
*** 1676,1682 ****
            }
  #endif
          pane_string = (NILP (pane_name)
!                        ? "" : (char *) XSTRING (pane_name)->data);
          /* If there is just one top-level pane, put all its items directly
             under the top-level menu.  */
          if (menu_items_n_panes == 1)
--- 1676,1682 ----
            }
  #endif
          pane_string = (NILP (pane_name)
!                        ? "" : (char *) SDATA (pane_name));
          /* If there is just one top-level pane, put all its items directly
             under the top-level menu.  */
          if (menu_items_n_panes == 1)
***************
*** 1741,1749 ****
            prev_wv->next = wv;
          else 
            save_wv->contents = wv;
!         wv->name = (char *) XSTRING (item_name)->data;
          if (!NILP (descrip))
!           wv->key = (char *) XSTRING (descrip)->data;
          wv->value = 0;
          /* Use the contents index as call_data, since we are
               restricted to 16-bits.  */
--- 1741,1749 ----
            prev_wv->next = wv;
          else 
            save_wv->contents = wv;
!         wv->name = (char *) SDATA (item_name);
          if (!NILP (descrip))
!           wv->key = (char *) SDATA (descrip);
          wv->value = 0;
          /* Use the contents index as call_data, since we are
               restricted to 16-bits.  */
***************
*** 1787,1793 ****
        if (STRING_MULTIBYTE (title))
        title = ENCODE_SYSTEM (title);
  #endif
!       wv_title->name = (char *) XSTRING (title)->data;
        wv_title->enabled = TRUE;
        wv_title->title = TRUE;
        wv_title->button_type = BUTTON_TYPE_NONE;
--- 1787,1793 ----
        if (STRING_MULTIBYTE (title))
        title = ENCODE_SYSTEM (title);
  #endif
!       wv_title->name = (char *) SDATA (title);
        wv_title->enabled = TRUE;
        wv_title->title = TRUE;
        wv_title->button_type = BUTTON_TYPE_NONE;
***************
*** 2047,2053 ****
      pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME];
      prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX];
      pane_string = (NILP (pane_name)
!                  ? "" : (char *) XSTRING (pane_name)->data);  
      prev_wv = xmalloc_widget_value ();
      prev_wv->value = pane_string;
      if (keymaps && !NILP (prefix))
--- 2047,2053 ----
      pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME];
      prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX];
      pane_string = (NILP (pane_name)
!                  ? "" : (char *) SDATA (pane_name));  
      prev_wv = xmalloc_widget_value ();
      prev_wv->value = pane_string;
      if (keymaps && !NILP (prefix))
***************
*** 2096,2103 ****
        prev_wv->next = wv;
        wv->name = (char *) button_names[nb_buttons];
        if (!NILP (descrip))
!         wv->key = (char *) XSTRING (descrip)->data;
!       wv->value = (char *) XSTRING (item_name)->data;
        wv->call_data = (void *) i;
          /* menu item is identified by its index in menu_items table */
        wv->enabled = !NILP (enable);
--- 2096,2103 ----
        prev_wv->next = wv;
        wv->name = (char *) button_names[nb_buttons];
        if (!NILP (descrip))
!         wv->key = (char *) SDATA (descrip);
!       wv->value = (char *) SDATA (item_name);
        wv->call_data = (void *) i;
          /* menu item is identified by its index in menu_items table */
        wv->enabled = !NILP (enable);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]