4
* Functions to look after the Short Packet window.
7
* * Revision 1.1.1.1 1998/11/01 17:24:11 siegl
8
* * COW 3.0 initial revision
15
#include "copyright.h"
29
* Refresh button i in the Short Packed Window.
32
* SPK_VFIELD - Variable short packets.
33
* SPK_MFIELD - Messages.
34
* SPK_KFIELD - Kill Messages.
35
* SPK_WFIELD - Warn Messages.
36
* SPK_TFIELD - Recieve Threshold.
46
sprintf(buf, "%seceive variable and short packets",
47
recv_short ? "R" : "Don't r");
50
sprintf(buf, "%seceive messages", recv_mesg ? "R" : "Don't r");
53
sprintf(buf, "%seceive kill messages", recv_kmesg ? "R" : "Don't r");
56
sprintf(buf, "%seceive warning messages", recv_warn ? "R" : "Don't r");
59
sprintf(buf, "Receive threshold: %s_", recv_threshold_s);
66
W_WriteText(spWin, 0, i, textColor, buf, strlen(buf), 0);
70
void spaction(W_Event * data)
72
* Handle a button press.
83
if (data->type == W_EV_BUTTON)
86
sendShortReq(SPK_VOFF);
88
sendShortReq(SPK_VON);
93
if (data->type == W_EV_BUTTON)
96
sendShortReq(SPK_MOFF);
98
sendShortReq(SPK_MON);
103
if (data->type == W_EV_BUTTON)
106
sendShortReq(SPK_M_NOKILLS);
108
sendShortReq(SPK_M_KILLS);
113
if (data->type == W_EV_BUTTON)
116
sendShortReq(SPK_M_NOWARN);
118
sendShortReq(SPK_M_WARN);
123
if (data->type == W_EV_KEY)
129
cp = recv_threshold_s;
139
recv_threshold_s[0] = '\0';
143
if (data->key >= '0' && data->key <= '9')
145
cp = recv_threshold_s;
156
sprefresh(SPK_TFIELD);
162
if (data->type == W_EV_BUTTON)
164
if (sscanf(recv_threshold_s, "%d", &v) != 1)
165
strcpy(recv_threshold_s, "0");
166
else if (recv_threshold != v)
169
sendThreshold(recv_threshold);
184
for (i = 0; i < SPK_NUMFIELDS; i++)
195
W_UnmapWindow(spWin);