Mercurial > emacs
annotate oldXMenu/Destroy.c @ 69860:000a5d4aa083
(rcirc-default-server): Rename from rcirc-server.
(rcirc-default-port): Rename from rcirc-port.
(rcirc-default-nick): Rename from rcirc-nick.
(rcirc-default-user-name): Rename from rcirc-user-name.
(rcirc-default-user-full-name): Rename from rcirc-user-full-name.
(rcirc-low-priority-flag): New variable.
(rcirc-decode-coding-system): New defcustom.
(rcirc-encode-coding-system): New defcustom.
(rcirc-coding-system-alist): New defcustom.
(rcirc-multiline-major-mode): New defcustom.
(rcirc-nick): New internal variable.
(rcirc-process): Remove variable.
(rcirc-server-buffer): New variable.
(rcirc): Update to use rcirc-default-* variables above.
(rcirc-connect): Do not add window-configuration-hook-here.
(rcirc-server): New internal variable.
(rcirc-connect): Do not send keepalive pings if rcirc-keepalive-seconds is nil.
(with-rcirc-server-buffer): New macro.
(rcirc-send-string): Encode with rcirc-encode-coding-system.
(rcirc-server-name): Rename from rcirc-server.
(rcirc-buffer-process): New function.
(rcirc-buffer-nick): New function.
(rcirc-buffer-target): Remove function.
(set-rcirc-decode-coding-system, set-rcirc-encode-coding-system): New commands.
(rcirc-mode-map): Change binding of C-c C-l to rcirc-toggle-low-priority.
(rcirc-mode): Initialize coding system based on rcirc-coding-system-alist.
New change-major-mode-hook to part the channel on a mode change.
Make kill-buffer-hook buffer-local.
(rcirc-change-major-mode-hook): New function.
(rcirc-clean-up-buffer): Rename from rcirc-kill-buffer-hook-1.
(rcirc-last-post-time): New variable.
(rcirc-process-message): Store the last time user posted a message to this
target.
(rcirc-multiline-minor-mode): New mode.
(rcirc-multiline-minor-mode-map): New mode map.
(rcirc-edit-multiline): Put multiline-edit buffer in
rcirc-multiline-major-mode along with rcirc-multiline-minor-mode.
(rcirc-print): Any line starting with an ignored nick will be ignored.
(rcirc-print): Decode using rcirc-decode-coding-system.
(rcirc-track-minor-mode): Update global-mode-string when disabling this mode.
(minor-mode-alist): add LowPri indicator.
(rcirc-toggle-low-priority): New function.
(rcirc-last-non-irc-buffer): Prefix arg now no means switch to next low priority
buffer with activity.
(rcirc-record-activity): Sort buffers in rcirc-activity by the last time the
user posted a message in to the target.
(rcirc-update-activity-string): New formatting for low priority buffers.
(rcirc-split-activity): New function.
(rcirc-handler-PART, rcirc-handler-KICK)
(rcirc-handler-PART-or-KICK): Kick responses are printed properly.
(rcirc-nick-away-alist): New variable.
(rcirc-handler-301): New handler. Away messages are printed once per change.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 08 Apr 2006 10:23:24 +0000 |
parents | e8a3fb527b77 |
children | ce127a46b1ca d04d8ccb3c41 c5406394f567 |
rev | line source |
---|---|
25858 | 1 #include "copyright.h" |
2 | |
3 /* Copyright Massachusetts Institute of Technology 1985 */ | |
68640
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65000
diff
changeset
|
4 /* Copyright (C) 2002, 2003, 2004, 2005, |
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65000
diff
changeset
|
5 2006 Free Software Foundation, Inc. */ |
25858 | 6 |
7 /* | |
8 * XMenu: MIT Project Athena, X Window system menu package | |
9 * | |
10 * XMenuDestroy - Free all resources associated with and XMenu. | |
11 * | |
12 * Author: Tony Della Fera, DEC | |
13 * August, 1985 | |
14 * | |
15 */ | |
16 | |
17 #include "XMenuInt.h" | |
18 | |
19 XMenuDestroy(display, menu) | |
20 Display *display; | |
21 register XMenu *menu; /* Menu object to destroy. */ | |
22 { | |
23 register XMPane *p_ptr; /* Pointer to the current pane. */ | |
24 register XMPane *p_next; /* Pointer to the next pane. */ | |
25 register XMSelect *s_ptr; /* Pointer to the current selection. */ | |
26 register XMSelect *s_next; /* Pointer to the next selection. */ | |
27 | |
28 /* | |
29 * Destroy the selection and pane X windows and free | |
30 * their corresponding XMWindows. | |
31 */ | |
32 for ( | |
33 p_ptr = menu->p_list->next; | |
34 p_ptr != menu->p_list; | |
35 p_ptr = p_next | |
36 ) { | |
37 for ( | |
38 s_ptr = p_ptr->s_list->next; | |
39 s_ptr != p_ptr->s_list; | |
40 s_ptr = s_next | |
41 ) { | |
42 s_next = s_ptr->next; | |
43 free(s_ptr); | |
44 } | |
45 if (p_ptr->window) { | |
46 XDestroySubwindows(display, p_ptr->window); | |
47 XDestroyWindow(display, p_ptr->window); | |
48 } | |
49 p_next = p_ptr->next; | |
50 free(p_ptr); | |
51 } | |
52 | |
53 /* | |
54 * Destroy the association table. | |
55 */ | |
56 XDestroyAssocTable(menu->assoc_tab); | |
57 | |
58 /* | |
59 * Free the mouse cursor. | |
60 */ | |
61 XFreeCursor(display, menu->mouse_cursor); | |
62 | |
63 /* | |
64 * Free the fonts. | |
65 */ | |
66 XFreeFont(display, menu->p_fnt_info); | |
67 XFreeFont(display, menu->s_fnt_info); | |
68 | |
69 /* | |
70 * Free the pixmaps. | |
71 */ | |
72 /* XFreePixmap(display, menu->p_bdr_pixmap); | |
73 XFreePixmap(display, menu->s_bdr_pixmap); | |
74 XFreePixmap(display, menu->p_frg_pixmap); | |
75 XFreePixmap(display, menu->s_frg_pixmap); | |
76 XFreePixmap(display, menu->bkgnd_pixmap); */ | |
77 XFreePixmap(display, menu->inact_pixmap); | |
78 | |
79 /* | |
80 * Free the color cells. | |
81 */ | |
82 if ((menu->p_bdr_color != BlackPixel(display, DefaultScreen(display))) && (menu->p_bdr_color != WhitePixel(display, DefaultScreen(display)))) | |
83 XFreeColors( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
84 display, |
25858 | 85 DefaultColormap(display, DefaultScreen(display)), |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
86 &menu->p_bdr_color, |
25858 | 87 1, 0); |
88 if ((menu->s_bdr_color != BlackPixel(display, DefaultScreen(display))) && (menu->s_bdr_color != WhitePixel(display, DefaultScreen(display)))) | |
89 XFreeColors( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
90 display, |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
91 DefaultColormap(display, DefaultScreen(display)), |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
92 &menu->s_bdr_color, |
25858 | 93 1, 0); |
94 if ((menu->p_frg_color != BlackPixel(display, DefaultScreen(display))) && (menu->p_frg_color != WhitePixel(display, DefaultScreen(display)))) | |
95 XFreeColors( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
96 display, |
25858 | 97 DefaultColormap(display, DefaultScreen(display)), |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
98 &menu->p_frg_color, |
25858 | 99 1, 0); |
100 if ((menu->s_frg_color != BlackPixel(display, DefaultScreen(display))) && (menu->s_frg_color != WhitePixel(display, DefaultScreen(display)))) | |
101 XFreeColors( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
102 display, |
25858 | 103 DefaultColormap(display, DefaultScreen(display)), |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
104 &menu->s_frg_color, |
25858 | 105 1, 0); |
106 if ((menu->bkgnd_color != BlackPixel(display, DefaultScreen(display))) && (menu->bkgnd_color != WhitePixel(display, DefaultScreen(display)))) | |
107 XFreeColors( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
108 display, |
25858 | 109 DefaultColormap(display, DefaultScreen(display)), |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
110 &menu->bkgnd_color, |
25858 | 111 1, 0); |
112 | |
113 /* | |
114 * Free the XMenu. | |
115 */ | |
116 free(menu); | |
117 } | |
52401 | 118 |
119 /* arch-tag: 44c9589f-5893-46fc-bc23-1b03a7f9c015 | |
120 (do not change this comment) */ |