Mercurial > emacs
comparison src/nsmenu.m @ 112434:9de5a68b57e1
Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 22 Jan 2011 18:56:06 -0800 |
parents | 7935463f385e |
children |
comparison
equal
deleted
inserted
replaced
112433:7b649f6eac4f | 112434:9de5a68b57e1 |
---|---|
353 if (NILP (string)) | 353 if (NILP (string)) |
354 break; | 354 break; |
355 /* if (submenu && strcmp (submenuTitle, SDATA (string))) | 355 /* if (submenu && strcmp (submenuTitle, SDATA (string))) |
356 continue; */ | 356 continue; */ |
357 | 357 |
358 wv->name = (char *) SDATA (string); | 358 wv->name = SSDATA (string); |
359 update_submenu_strings (wv->contents); | 359 update_submenu_strings (wv->contents); |
360 wv = wv->next; | 360 wv = wv->next; |
361 } | 361 } |
362 | 362 |
363 /* Now, update the NS menu; if we have a submenu, use that, otherwise | 363 /* Now, update the NS menu; if we have a submenu, use that, otherwise |
442 | 442 |
443 if (n < 100) | 443 if (n < 100) |
444 strncpy (previous_strings[i/4], SDATA (string), 10); | 444 strncpy (previous_strings[i/4], SDATA (string), 10); |
445 | 445 |
446 wv = xmalloc_widget_value (); | 446 wv = xmalloc_widget_value (); |
447 wv->name = (char *) SDATA (string); | 447 wv->name = SSDATA (string); |
448 wv->value = 0; | 448 wv->value = 0; |
449 wv->enabled = 1; | 449 wv->enabled = 1; |
450 wv->button_type = BUTTON_TYPE_NONE; | 450 wv->button_type = BUTTON_TYPE_NONE; |
451 wv->help = Qnil; | 451 wv->help = Qnil; |
452 wv->call_data = (void *) (EMACS_INT) (-1); | 452 wv->call_data = (void *) (EMACS_INT) (-1); |
831 pane_name = ENCODE_MENU_STRING (pane_name); | 831 pane_name = ENCODE_MENU_STRING (pane_name); |
832 ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); | 832 ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); |
833 } | 833 } |
834 #endif | 834 #endif |
835 pane_string = (NILP (pane_name) | 835 pane_string = (NILP (pane_name) |
836 ? "" : (char *) SDATA (pane_name)); | 836 ? "" : SSDATA (pane_name)); |
837 /* If there is just one top-level pane, put all its items directly | 837 /* If there is just one top-level pane, put all its items directly |
838 under the top-level menu. */ | 838 under the top-level menu. */ |
839 if (menu_items_n_panes == 1) | 839 if (menu_items_n_panes == 1) |
840 pane_string = ""; | 840 pane_string = ""; |
841 | 841 |
896 wv = xmalloc_widget_value (); | 896 wv = xmalloc_widget_value (); |
897 if (prev_wv) | 897 if (prev_wv) |
898 prev_wv->next = wv; | 898 prev_wv->next = wv; |
899 else | 899 else |
900 save_wv->contents = wv; | 900 save_wv->contents = wv; |
901 wv->name = (char *) SDATA (item_name); | 901 wv->name = SSDATA (item_name); |
902 if (!NILP (descrip)) | 902 if (!NILP (descrip)) |
903 wv->key = (char *) SDATA (descrip); | 903 wv->key = SSDATA (descrip); |
904 wv->value = 0; | 904 wv->value = 0; |
905 /* If this item has a null value, | 905 /* If this item has a null value, |
906 make the call_data null so that it won't display a box | 906 make the call_data null so that it won't display a box |
907 when the mouse is on it. */ | 907 when the mouse is on it. */ |
908 wv->call_data | 908 wv->call_data |
947 #ifndef HAVE_MULTILINGUAL_MENU | 947 #ifndef HAVE_MULTILINGUAL_MENU |
948 if (STRING_MULTIBYTE (title)) | 948 if (STRING_MULTIBYTE (title)) |
949 title = ENCODE_MENU_STRING (title); | 949 title = ENCODE_MENU_STRING (title); |
950 #endif | 950 #endif |
951 | 951 |
952 wv_title->name = (char *) SDATA (title); | 952 wv_title->name = SSDATA (title); |
953 wv_title->enabled = NO; | 953 wv_title->enabled = NO; |
954 wv_title->button_type = BUTTON_TYPE_NONE; | 954 wv_title->button_type = BUTTON_TYPE_NONE; |
955 wv_title->help = Qnil; | 955 wv_title->help = Qnil; |
956 wv_title->next = wv_sep; | 956 wv_title->next = wv_sep; |
957 first_wv->contents = wv_title; | 957 first_wv->contents = wv_title; |
1034 idx = -1; | 1034 idx = -1; |
1035 } | 1035 } |
1036 helpObj = TOOLPROP (TOOL_BAR_ITEM_HELP); | 1036 helpObj = TOOLPROP (TOOL_BAR_ITEM_HELP); |
1037 if (NILP (helpObj)) | 1037 if (NILP (helpObj)) |
1038 helpObj = TOOLPROP (TOOL_BAR_ITEM_CAPTION); | 1038 helpObj = TOOLPROP (TOOL_BAR_ITEM_CAPTION); |
1039 helpText = NILP (helpObj) ? "" : (char *)SDATA (helpObj); | 1039 helpText = NILP (helpObj) ? "" : SSDATA (helpObj); |
1040 | 1040 |
1041 /* Ignore invalid image specifications. */ | 1041 /* Ignore invalid image specifications. */ |
1042 if (!valid_image_p (image)) | 1042 if (!valid_image_p (image)) |
1043 { | 1043 { |
1044 /* Don't log anything, GNUS makes invalid images all the time. */ | 1044 /* Don't log anything, GNUS makes invalid images all the time. */ |