Mercurial > emacs
annotate oldXMenu/AddPane.c @ 65980:4520ae2624f2
* mh-init.el (mh-image-load-path): New function that adds the path to
the MH-E images to the image-load-path or load-path depending on the
version of Emacs.
* mh-customize.el: Call mh-image-load-path just before
mh-tool-bar-define so that the toolbar images can be found.
* mh-customize.el (mh-invisible-header-fields-internal)
(mh-invisible-header-fields-internal): Add Received-SPF header and
X-Gmail- prefixes seen from Gmail. Jeffrey C Honig
<jch@honig.net>
* mh-customize.el (mh-customize): Use customization group mh-e.
* mh-e.el (desktop-buffer-mode-handlers): Only add to this list if
the variable exists. Not present pre-version 22.
(Version, mh-version): Added +cvs to version.
* mh-unit.el (mh-unit): Changed lm-verify test to Emacs 22.
* Makefile: Incorporated ideas from Clemens Fruhwirth to
generalize mh-loaddefs.el to make it work for both GNU Emacs and
XEmacs.
(EMACS_OPTIONS, XEMACS_OPTIONS): Use double-dash for all long
options.
(EMACS_LOADDEFS_COOKIE): New variable for generate-autoload-cookie
setting. Obsoletes XEMACS_LOADDEFS_COOKIE.
(EMACS_EXPORT_MH_LOADDEFS): New variable for GNU Emacs commands to
rebuild mh-loaddefs.el.
(XEMACS_EXPORT_MH_LOADDEFS): New variable for XEmacs commands to
rebuild mh-loaddefs.el. Obsoletes XEMACS_LOADDEFS_FILE and
XEMACS_LOADDEFS_PKG_NAME.
(MH-E-LOADDEFS-SRC): New variable which is set to $(MH-E-SRC) on
GNU Emacs, and adds $(MH-E-XEMACS-SRC) on XEmacs.
(all): Modify EMACS_EXPORT_MH_LOADDEFS and MH-E-LOADDEFS-SRC on
XEMacs.
(mh-loaddefs.el): Now depends on $(MH-E-LOADDEFS-SRC) and has
generic compile command that works on both GNU Emacs XEmacs.
(xemacs): Depend on autoloads instead of deleted loaddefs-xemacs.
(loaddefs-xemacs): Deleted.
* mh-comp.el (mh-font-lock-field-data): Fix a bug where the
function would return t but match-data was being set to nil
(closes SF #1241017). Satyaki Das <satyaki@theforce.stanford.edu>.
* mh-comp.el (mh-insert-auto-fields): Inset identity regardless of
whether one was already set, since if one used a default identity
it would never be overridden. Peter S Galbraith
<psg@debian.org>
* mh-init.el (mh-path): Use customization group mh-e. Thanks to
Peter Whaite for these patches (closes SF #1213716).
* mh-mime.el (mh-compose-forward): Only use mh-sent-from-msg as a
default message if it's a number (as is done elsewhere).
Otherwise, an error is thrown if this function is called from a
draft created by mh-forward since this variable is a list. Also
added a space after the "Messages [%s]:" prompt.
* mh-mime.el (mh-compose-forward): Allow insertion of multiple
forwarded messages by range (including sequences). For the sent
folder the default message presented is the sent message. For
other folders, the default message is "cur", if it exists.
Jeffrey C Honig <jch@honig.net>
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Mon, 10 Oct 2005 16:37:54 +0000 |
parents | 3861ff8f4bf1 |
children | e8a3fb527b77 532e0a9335a9 2d92f5c9d6ae |
rev | line source |
---|---|
25858 | 1 #include "copyright.h" |
2 | |
3 /* Copyright Massachusetts Institute of Technology 1985 */ | |
65000
3861ff8f4bf1
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
54770
diff
changeset
|
4 /* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. */ |
25858 | 5 |
6 /* | |
7 * XMenu: MIT Project Athena, X Window system menu package | |
8 * | |
9 * XMenuAddPane - Adds a pane to an XMenu object. | |
10 * | |
11 * Author: Tony Della Fera, DEC | |
12 * August, 1985 | |
13 * | |
14 */ | |
15 | |
16 #include <config.h> | |
17 #include "XMenuInt.h" | |
18 | |
19 int | |
20 XMenuAddPane(display, menu, label, active) | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
21 Display *display; |
25858 | 22 register XMenu *menu; /* Menu object to be modified. */ |
23 register char *label; /* Selection label. */ | |
24 int active; /* Make selection active? */ | |
25 { | |
26 register XMPane *pane; /* Newly created pane. */ | |
27 register XMSelect *select; /* Initial selection for the new pane. */ | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
28 |
25858 | 29 int label_length; /* Label length in characters. */ |
30 int label_width; /* Label width in pixels. */ | |
31 | |
32 /* | |
33 * Check for NULL pointers! | |
34 */ | |
35 if (label == NULL) { | |
36 _XMErrorCode = XME_ARG_BOUNDS; | |
37 return(XM_FAILURE); | |
38 } | |
39 | |
40 /* | |
41 * Calloc the XMPane structure and the initial XMSelect. | |
42 */ | |
43 pane = (XMPane *)calloc(1, sizeof(XMPane)); | |
44 if (pane == NULL) { | |
45 _XMErrorCode = XME_CALLOC; | |
46 return(XM_FAILURE); | |
47 } | |
48 select = (XMSelect *)calloc(1, sizeof(XMSelect)); | |
49 if (select == NULL) { | |
50 _XMErrorCode = XME_CALLOC; | |
51 return(XM_FAILURE); | |
52 } | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
53 |
25858 | 54 /* |
55 * Determine label size. | |
56 */ | |
57 label_length = strlen(label); | |
58 label_width = XTextWidth(menu->p_fnt_info, | |
59 label, | |
60 label_length); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
61 |
25858 | 62 /* |
63 * Set up the initial selection. | |
64 * Values not explicitly set are zeroed by calloc. | |
65 */ | |
66 select->next = select; | |
67 select->prev = select; | |
68 select->type = SL_HEADER; | |
69 select->serial = -1; | |
70 select->parent_p = pane; | |
71 | |
72 /* | |
73 * Fill the XMPane structure. | |
74 * X and Y position are set to 0 since a recompute will follow. | |
75 */ | |
76 pane->type = PANE; | |
77 pane->active = active; | |
78 pane->serial = -1; | |
79 pane->label = label; | |
80 pane->label_width = label_width; | |
81 pane->label_length = label_length; | |
82 pane->s_list = select; | |
83 | |
84 /* | |
85 * Insert the pane at the end of the pane list. | |
86 */ | |
87 emacs_insque(pane, menu->p_list->prev); | |
88 | |
89 /* | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
90 * Update the pane count. |
25858 | 91 */ |
92 menu->p_count++; | |
93 | |
94 /* | |
95 * Schedule a recompute. | |
96 */ | |
97 menu->recompute = 1; | |
98 | |
99 /* | |
100 * Return the pane number just added. | |
101 */ | |
102 _XMErrorCode = XME_NO_ERROR; | |
103 return((menu->p_count - 1)); | |
104 } | |
52401 | 105 |
106 /* arch-tag: 62a26021-f29d-48ba-96ef-3b6c4ebd6547 | |
107 (do not change this comment) */ |