4
* Functions to look after the Short Packet window.
25
* Refresh button i in the Short Packed Window.
28
* SPK_VFIELD - Variable short packets.
29
* SPK_MFIELD - Messages.
30
* SPK_KFIELD - Kill Messages.
31
* SPK_WFIELD - Warn Messages.
32
* SPK_TFIELD - Recieve Threshold.
42
sprintf(buf, "%seceive variable and short packets",
43
recv_short ? "R" : "Don't r");
46
sprintf(buf, "%seceive messages", recv_mesg ? "R" : "Don't r");
49
sprintf(buf, "%seceive kill messages", recv_kmesg ? "R" : "Don't r");
52
sprintf(buf, "%seceive warning messages", recv_warn ? "R" : "Don't r");
55
sprintf(buf, "Receive threshold: %s_", recv_threshold_s);
62
W_WriteText(spWin, 0, i, textColor, buf, strlen(buf), 0);
66
void spaction(W_Event * data)
68
* Handle a button press.
79
if (data->type == W_EV_BUTTON)
82
sendShortReq(SPK_VOFF);
84
sendShortReq(SPK_VON);
89
if (data->type == W_EV_BUTTON)
92
sendShortReq(SPK_MOFF);
94
sendShortReq(SPK_MON);
99
if (data->type == W_EV_BUTTON)
102
sendShortReq(SPK_M_NOKILLS);
104
sendShortReq(SPK_M_KILLS);
109
if (data->type == W_EV_BUTTON)
112
sendShortReq(SPK_M_NOWARN);
114
sendShortReq(SPK_M_WARN);
119
if (data->type == W_EV_KEY)
125
cp = recv_threshold_s;
135
recv_threshold_s[0] = '\0';
139
if (data->key >= '0' && data->key <= '9')
141
cp = recv_threshold_s;
152
sprefresh(SPK_TFIELD);
158
if (data->type == W_EV_BUTTON)
160
if (sscanf(recv_threshold_s, "%d", &v) != 1)
161
strcpy(recv_threshold_s, "0");
162
else if (recv_threshold != v)
165
sendThreshold(recv_threshold);
180
for (i = 0; i < SPK_NUMFIELDS; i++)
191
W_UnmapWindow(spWin);