Mercurial > emacs
annotate oldXMenu/DelSel.c @ 54736:b94de166de9d
(ethio-sera-being-called-by-w3): New
variable.
(ethio-sera-to-fidel-ethio): Check ethio-sera-being-called-by-w3
instead of sera-being-called-by-w3.
(ethio-fidel-to-sera-buffer): Likewise.
(ethio-find-file): Bind ethio-sera-being-called-by-w3 to t
instead of sera-being-called-by-w3.
(ethio-write-file): Likewise.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Mon, 05 Apr 2004 23:27:37 +0000 |
| parents | 695cf19ef79e |
| children | f0eb34e60705 e8824c4f5f7e 375f2633d815 |
| rev | line source |
|---|---|
| 25858 | 1 #include "copyright.h" |
| 2 | |
| 52401 | 3 /* $Header: /cvsroot/emacs/emacs/oldXMenu/DelSel.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */ |
| 25858 | 4 /* Copyright Massachusetts Institute of Technology 1985 */ |
| 5 | |
| 6 /* | |
| 7 * XMenu: MIT Project Athena, X Window system menu package | |
| 8 * | |
| 9 * XMenuDeleteSelection - Deletes a selection from an XMenu object. | |
| 10 * | |
| 11 * Author: Tony Della Fera, DEC | |
| 12 * 20-Nov-85 | |
| 13 * | |
| 14 */ | |
| 15 | |
| 16 #include "XMenuInt.h" | |
| 17 | |
| 18 int | |
| 19 XMenuDeleteSelection(display, menu, p_num, s_num) | |
| 20 register Display *display; /* Previously opened display. */ | |
| 21 register XMenu *menu; /* Menu object to be modified. */ | |
| 22 register int p_num; /* Pane number to be deleted. */ | |
| 23 register int s_num; /* Selection number to be deleted. */ | |
| 24 { | |
| 25 register XMPane *p_ptr; /* Pointer to pane being deleted. */ | |
| 26 register XMSelect *s_ptr; /* Pointer to selections being deleted. */ | |
|
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
27 |
| 25858 | 28 /* |
| 29 * Find the right pane. | |
| 30 */ | |
| 31 p_ptr = _XMGetPanePtr(menu, p_num); | |
| 32 if (p_ptr == NULL) return(XM_FAILURE); | |
| 33 | |
| 34 /* | |
| 35 * Find the right selection. | |
| 36 */ | |
| 37 s_ptr = _XMGetSelectionPtr(p_ptr, s_num); | |
| 38 if (s_ptr == NULL) return(XM_FAILURE); | |
| 39 | |
| 40 /* | |
| 41 * Remove the selection from the association table. | |
| 42 */ | |
| 43 XDeleteAssoc(display, menu->assoc_tab, s_ptr->window); | |
| 44 | |
| 45 /* | |
| 46 * Remove the selection from the parent pane's selection | |
| 47 * list and update the selection count. | |
| 48 */ | |
| 49 emacs_remque(s_ptr); | |
| 50 p_ptr->s_count--; | |
| 51 | |
| 52 /* | |
| 53 * Destroy the selection transparency. | |
| 54 */ | |
| 55 if (s_ptr->window) XDestroyWindow(display, s_ptr->window); | |
|
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
56 |
| 25858 | 57 /* |
| 58 * Free the selection's XMSelect structure. | |
| 59 */ | |
| 60 free(s_ptr); | |
| 61 | |
| 62 /* | |
| 63 * Schedule a recompute. | |
| 64 */ | |
| 65 menu->recompute = 1; | |
| 66 | |
| 67 /* | |
| 68 * Return the selection number just deleted. | |
| 69 */ | |
| 70 _XMErrorCode = XME_NO_ERROR; | |
| 71 return(s_num); | |
| 72 } | |
| 52401 | 73 |
| 74 /* arch-tag: 24ca2bc7-8a37-471a-8095-e6363fc1ed10 | |
| 75 (do not change this comment) */ |
