Rev 5640 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5640 | Rev 5674 | ||
---|---|---|---|
Line 60... | Line 60... | ||
60 | } |
60 | } |
61 | } |
61 | } |
62 | break; |
62 | break; |
Line 63... | Line 63... | ||
63 | 63 | ||
64 | case SEND_NLIST: |
64 | case SEND_NLIST: |
65 | WriteText(5, Form.cheight-11, 0x80, sc.work_text, "Send LIST, awaiting answer..."); |
65 | WriteText(5, Form.cheight-11, 0x80, system.color.work_text, "Send LIST, awaiting answer..."); |
66 | request_len = GetRequest("LIST", NULL); |
66 | request_len = GetRequest("LIST", NULL); |
67 | Send(socketnum, #request, request_len, 0); |
67 | Send(socketnum, #request, request_len, 0); |
68 | if (EAX == 0xffffffff) {debugln("Error while sending LIST. Retry..."); break;} |
68 | if (EAX == 0xffffffff) {debugln("Error while sending LIST. Retry..."); break;} |
69 | else aim = GET_ANSWER_NLIST; |
69 | else aim = GET_ANSWER_NLIST; |
Line 232... | Line 232... | ||
232 | LoginBoxLoop(); |
232 | LoginBoxLoop(); |
233 | } |
233 | } |
234 | if (id==CHANGE_CHARSET) |
234 | if (id==CHANGE_CHARSET) |
235 | { |
235 | { |
236 | DefineButton(0,0,Form.cwidth,Form.cheight, CLOSE_CHANGE_CHARSET+BT_HIDE+BT_NOFRAME); |
236 | DefineButton(0,0,Form.cwidth,Form.cheight, CLOSE_CHANGE_CHARSET+BT_HIDE+BT_NOFRAME); |
237 | DrawRectangle(Form.cwidth-100, Form.cheight-status_bar_h- 70, 70, 82, sc.work_graph); |
237 | DrawRectangle(Form.cwidth-100, Form.cheight-status_bar_h- 70, 70, 82, system.color.work_graph); |
238 | DrawRectangle3D(Form.cwidth-99, Form.cheight-status_bar_h- 69, 68, 80, 0xFFFfff, sc.work); |
238 | DrawRectangle3D(Form.cwidth-99, Form.cheight-status_bar_h- 69, 68, 80, 0xFFFfff, system.color.work); |
239 | for (id=0; id<5; id++) |
239 | for (id=0; id<5; id++) |
240 | { |
240 | { |
241 | if (cur_charset==id+1) { line_col=sc.work_button; text_col=sc.work_button_text; } |
241 | if (cur_charset==id+1) { line_col=system.color.work_button; text_col=system.color.work_button_text; } |
242 | else { line_col=sc.work; text_col=sc.work_text; } |
242 | else { line_col=system.color.work; text_col=system.color.work_text; } |
243 | DrawBar(Form.cwidth-98, id*16+Form.cheight-status_bar_h- 68, 67, 16, line_col); |
243 | DrawBar(Form.cwidth-98, id*16+Form.cheight-status_bar_h- 68, 67, 16, line_col); |
244 | DrawCaptButton(Form.cwidth-100, id*16+Form.cheight-status_bar_h- 68, 70,16, 10+id+BT_HIDE, |
244 | DrawCaptButton(Form.cwidth-100, id*16+Form.cheight-status_bar_h- 68, 70,16, 10+id+BT_HIDE, |
245 | 0, text_col, charsets[id+1]); |
245 | 0, text_col, charsets[id+1]); |
246 | } |
246 | } |
247 | } |
247 | } |
Line 259... | Line 259... | ||
259 | 259 | ||
260 | break; |
260 | break; |
261 | case evReDraw: _MB_DRAW: |
261 | case evReDraw: _MB_DRAW: |
262 | if !(DefineWindow(MAILBOX_HEADER)) break; |
262 | if !(DefineWindow(MAILBOX_HEADER)) break; |
263 | scroll1.bckg_col = scroll_wv.bckg_col = 0xBBBbbb; |
263 | scroll1.bckg_col = scroll_wv.bckg_col = 0xBBBbbb; |
264 | scroll1.frnt_col = scroll_wv.frnt_col = sc.work; |
264 | scroll1.frnt_col = scroll_wv.frnt_col = system.color.work; |
265 | scroll1.line_col = scroll_wv.line_col = sc.work_graph; |
265 | scroll1.line_col = scroll_wv.line_col = system.color.work_graph; |
266 | DrawToolbar(); |
266 | DrawToolbar(); |
Line 267... | Line 267... | ||
267 | DrawMailBox(); |
267 | DrawMailBox(); |
268 | 268 | ||
Line 289... | Line 289... | ||
289 | #define BUT_H 22 |
289 | #define BUT_H 22 |
290 | #define BUT_W 74 |
290 | #define BUT_W 74 |
291 | int toolbar_w = BUT_Y + BUT_H + BUT_Y + 3; |
291 | int toolbar_w = BUT_Y + BUT_H + BUT_Y + 3; |
292 | mail_list.SetSizes(0, toolbar_w, Form.cwidth - scroll1.size_x - 1, mail_list.h, 60,18); |
292 | mail_list.SetSizes(0, toolbar_w, Form.cwidth - scroll1.size_x - 1, mail_list.h, 60,18); |
Line 293... | Line 293... | ||
293 | 293 | ||
294 | DrawBar(0,0, Form.cwidth,toolbar_w-3, sc.work); |
294 | DrawBar(0,0, Form.cwidth,toolbar_w-3, system.color.work); |
295 | DrawCaptButton(10 , BUT_Y, BUT_W, BUT_H, GET_MAIL, sc.work_button, sc.work_button_text,"Get mail"); |
295 | DrawCaptButton(10 , BUT_Y, BUT_W, BUT_H, GET_MAIL, system.color.work_button, system.color.work_button_text,"Get mail"); |
296 | DrawCaptButton(BUT_W+ 20, BUT_Y, BUT_W+10, BUT_H, SAVE_LETTER, sc.work_button, sc.work_button_text,"Save letter"); |
296 | DrawCaptButton(BUT_W+ 20, BUT_Y, BUT_W+10, BUT_H, SAVE_LETTER, system.color.work_button, system.color.work_button_text,"Save letter"); |
Line 297... | Line 297... | ||
297 | DrawCaptButton(Form.cwidth-BUT_W - 10, BUT_Y, BUT_W, BUT_H, EXIT_MAIL, sc.work_button, sc.work_button_text,"< Exit"); |
297 | DrawCaptButton(Form.cwidth-BUT_W - 10, BUT_Y, BUT_W, BUT_H, EXIT_MAIL, system.color.work_button, system.color.work_button_text,"< Exit"); |
298 | 298 | ||
299 | DrawBar(0, mail_list.y-3, mail_list.w,1, sc.work_graph); |
299 | DrawBar(0, mail_list.y-3, mail_list.w,1, system.color.work_graph); |
300 | DrawBar(0, mail_list.y-2, mail_list.w,1, 0xdfdfdf); |
300 | DrawBar(0, mail_list.y-2, mail_list.w,1, 0xdfdfdf); |
Line 301... | Line 301... | ||
301 | DrawBar(0, mail_list.y-1, mail_list.w,1, 0xf0f0f0); |
301 | DrawBar(0, mail_list.y-1, mail_list.w,1, 0xf0f0f0); |
Line 326... | Line 326... | ||
326 | DrawScroller1(); |
326 | DrawScroller1(); |
327 | } |
327 | } |
Line 328... | Line 328... | ||
328 | 328 | ||
329 | void DrawLetterInfo() { |
329 | void DrawLetterInfo() { |
330 | int lt_y = mail_list.y+mail_list.h; |
330 | int lt_y = mail_list.y+mail_list.h; |
331 | DrawBar(0, lt_y, mail_list.w, 1, sc.work_graph); |
331 | DrawBar(0, lt_y, mail_list.w, 1, system.color.work_graph); |
332 | DrawBar(0, lt_y+1, Form.cwidth, 1, LBUMP); |
332 | DrawBar(0, lt_y+1, Form.cwidth, 1, LBUMP); |
333 | DrawBar(0, lt_y+2, Form.cwidth, LIST_INFO_H-4, sc.work); |
333 | DrawBar(0, lt_y+2, Form.cwidth, LIST_INFO_H-4, system.color.work); |
334 | WriteText(mail_list.w-30/2, lt_y, 0x80, 0x888888, "= = ="); |
334 | WriteText(mail_list.w-30/2, lt_y, 0x80, 0x888888, "= = ="); |
335 | WriteText(mail_list.w-30/2, lt_y+1, 0x80, 0xEeeeee, "= = ="); |
335 | WriteText(mail_list.w-30/2, lt_y+1, 0x80, 0xEeeeee, "= = ="); |
336 | DrawBar(0, lt_y+LIST_INFO_H-2, Form.cwidth, 1, sc.work_graph); //bottom |
336 | DrawBar(0, lt_y+LIST_INFO_H-2, Form.cwidth, 1, system.color.work_graph); //bottom |
337 | DrawBar(0, lt_y+LIST_INFO_H-1, Form.cwidth, 1, 0xdfdfdf); |
337 | DrawBar(0, lt_y+LIST_INFO_H-1, Form.cwidth, 1, 0xdfdfdf); |
338 | DrawBar(0, lt_y+LIST_INFO_H , Form.cwidth, 1, 0xf0f0f0); |
338 | DrawBar(0, lt_y+LIST_INFO_H , Form.cwidth, 1, 0xf0f0f0); |
339 | WriteTextB(10, lt_y+8 , 0x80, sc.work_text, "From:"); |
339 | WriteTextB(10, lt_y+8 , 0x80, system.color.work_text, "From:"); |
340 | WriteText (45, lt_y+8 , 0x80, sc.work_text, #from); |
340 | WriteText (45, lt_y+8 , 0x80, system.color.work_text, #from); |
341 | WriteTextB(10, lt_y+20, 0x80, sc.work_text, "To:"); |
341 | WriteTextB(10, lt_y+20, 0x80, system.color.work_text, "To:"); |
342 | WriteText (45, lt_y+20, 0x80, sc.work_text, #to); |
342 | WriteText (45, lt_y+20, 0x80, system.color.work_text, #to); |
343 | WriteTextB(10, lt_y+32, 0x80, sc.work_text, "Date:"); |
343 | WriteTextB(10, lt_y+32, 0x80, system.color.work_text, "Date:"); |
344 | WriteText (45, lt_y+32, 0x80, sc.work_text, #date); |
344 | WriteText (45, lt_y+32, 0x80, system.color.work_text, #date); |
345 | WriteTextB(10, lt_y+44, 0x80, sc.work_text, "Subj:"); |
345 | WriteTextB(10, lt_y+44, 0x80, system.color.work_text, "Subj:"); |
346 | WriteText (45, lt_y+44, 0x80, sc.work_text, #subj); |
346 | WriteText (45, lt_y+44, 0x80, system.color.work_text, #subj); |
Line 347... | Line 347... | ||
347 | } |
347 | } |
348 | 348 | ||
Line 381... | Line 381... | ||
381 | 381 | ||
382 | 382 | ||
383 | 383 | ||
384 | void DrawStatusBar() { |
384 | void DrawStatusBar() { |
385 | int st_y = Form.cheight -status_bar_h; |
385 | int st_y = Form.cheight -status_bar_h; |
386 | DrawBar(0, st_y, Form.cwidth, status_bar_h, sc.work); |
386 | DrawBar(0, st_y, Form.cwidth, status_bar_h, system.color.work); |
387 | if (aim) { |
387 | if (aim) { |
388 | SetMailBoxStatus(cur_st_percent, cur_st_text); |
388 | SetMailBoxStatus(cur_st_percent, cur_st_text); |
389 | DrawCaptButton(240, st_y+1, 36, status_bar_h-3, STOP_LOADING, sc.work_button, sc.work_button_text,"Stop"); |
389 | DrawCaptButton(240, st_y+1, 36, status_bar_h-3, STOP_LOADING, system.color.work_button, system.color.work_button_text,"Stop"); |
Line 390... | Line 390... | ||
390 | } |
390 | } |
391 | DrawCaptButton(Form.cwidth - 100, st_y+1, 70, status_bar_h-2, CHANGE_CHARSET+BT_HIDE, sc.work, sc.work_text,charsets[cur_charset]); |
391 | DrawCaptButton(Form.cwidth - 100, st_y+1, 70, status_bar_h-2, CHANGE_CHARSET+BT_HIDE, system.color.work, system.color.work_text,charsets[cur_charset]); |
392 | } |
392 | } |
393 | 393 | ||
394 | 394 | ||
395 | 395 |