Subversion Repositories Kolibri OS

Rev

Rev 7970 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7970 Rev 9287
Line 1... Line 1...
1
//Leency & SoUrcerer, LGPL
1
//Leency & SoUrcerer, LGPL
2
//Hidnplayer
2
//Hidnplayer
Line 3... Line -...
3
 
-
 
4
TWebBrowser WB1;
-
 
5
 
3
 
6
#define LIST_INFO_H 59
4
#define LIST_INFO_H 59
Line 7... Line 5...
7
int status_bar_h = 15;
5
int status_bar_h = 15;
-
 
6
 
Line 8... Line 7...
8
 
7
scroll_bar scroll1 = { 17,200,210, LIST_INFO_H-3,18,0,115,15,0,0xCCCccc,0xD2CED0,0x555555,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
9
scroll_bar scroll1 = { 17,200,210, LIST_INFO_H-3,18,0,115,15,0,0xCCCccc,0xD2CED0,0x555555,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
8
scroll_bar scroll_wv;
Line 10... Line 9...
10
 
9
 
11
char *listbuffer;
10
char *listbuffer;
12
char *listpointer;
11
char *listpointer;
Line 13... Line 12...
13
 
12
 
Line -... Line 13...
-
 
13
char *mailstart;
Line 14... Line 14...
14
char *mailstart;
14
char *mailend;
15
char *mailend;
15
int mailsize;
16
int mailsize;
16
 
17
 
17
int cur_charset;
Line 91... Line 91...
91
				}
91
				}
92
				break;
92
				break;
Line 93... Line 93...
93
 
93
 
94
		case SEND_RETR:
94
		case SEND_RETR:
95
				from = to = date = subj = cur_charset = NULL;
-
 
96
				WB1.list.ClearList();
95
				from = to = date = subj = cur_charset = NULL;
97
				DrawMailBox();
96
				DrawMailBox();
98
				request_len = GetRequest("RETR", itoa(mail_list.cur_y+1));
97
				request_len = GetRequest("RETR", itoa(mail_list.cur_y+1));
99
				if (Send(socketnum, #request, request_len, 0) == 0xffffffff)
98
				if (Send(socketnum, #request, request_len, 0) == 0xffffffff)
100
				{
99
				{
Line 148... Line 147...
148
	int panels_drag=0, clicked_list=0;
147
	int panels_drag=0, clicked_list=0;
149
	dword line_col, text_col;
148
	dword line_col, text_col;
Line 150... Line 149...
150
 
149
 
151
	mail_list.h = Form.cheight/4;
150
	mail_list.h = Form.cheight/4;
152
	mail_list.ClearList();
-
 
153
	WB1.list.no_selection = true;
151
	mail_list.ClearList();
154
	SetMailBoxStatus( NULL , NULL);
152
	SetMailBoxStatus( NULL , NULL);
155
	cur_charset = 0;
153
	cur_charset = 0;
Line 156... Line 154...
156
	aim = SEND_NSTAT;
154
	aim = SEND_NSTAT;
Line 174... Line 172...
174
					mail_list.h = mouse.y - mail_list.y-2;
172
					mail_list.h = mouse.y - mail_list.y-2;
175
					DrawMailBox();
173
					DrawMailBox();
176
					break;
174
					break;
177
				}
175
				}
Line 178... Line 176...
178
 
176
 
Line 179... Line 177...
179
				links.hover(mouse.x, mouse.y);
177
				//links.hover(mouse.x, mouse.y);
180
 
178
 
Line 181... Line 179...
181
				if (!mail_list.count) break;
179
				if (!mail_list.count) break;
182
				if (!panels_drag) { scrollbar_v_mouse (#scroll1); scrollbar_v_mouse (#scroll_wv); }
180
				if (!panels_drag) { scrollbar_v_mouse (#scroll1); scrollbar_v_mouse (#scroll_wv); }
183
				
181
 
184
				if (mail_list.first <> scroll1.position)
182
				if (mail_list.first <> scroll1.position)
185
				{
183
				{
186
					mail_list.first = scroll1.position;
184
					mail_list.first = scroll1.position;
187
					DrawMailList();
185
					DrawMailList();
188
					break;
186
					break;
189
				};
187
				};
190
				if (WB1.list.first <> scroll_wv.position)
188
				if (list.first <> scroll_wv.position)
191
				{
189
				{
192
					WB1.list.first = scroll_wv.position;
190
					list.first = scroll_wv.position;
Line 193... Line 191...
193
					DrawLetter();
191
					DrawLetter();
194
					break;
192
					break;
195
				};
193
				};
196
				
194
 
197
				if (mail_list.y+mail_list.h + 10 > mouse.y)
195
				if (mail_list.y+mail_list.h + 10 > mouse.y)
198
				{
196
				{
199
					if (mail_list.MouseScroll(mouse.vert)) DrawMailList();
197
					if (mail_list.MouseScroll(mouse.vert)) DrawMailList();
200
				}
198
				}
201
				else
199
				else
202
				{
200
				{
203
					if (WB1.list.MouseScroll(mouse.vert)) DrawLetter();
201
					if (list.MouseScroll(mouse.vert)) DrawLetter();
204
				}
202
				}
Line 280... Line 278...
280
 
278
 
281
void DrawMailBox()
279
void DrawMailBox()
282
{
280
{
283
	DrawMailList();
281
	DrawMailList();
284
	DrawLetterInfo();
-
 
285
	InitTWB();
282
	DrawLetterInfo();
286
	DrawLetter();
283
	DrawLetter();
287
	DrawStatusBar();
284
	DrawStatusBar();
Line 349... Line 346...
349
	WriteTextB(10, lt_y+44, 0x80, sc.work_text, "Subj:");
346
	WriteTextB(10, lt_y+44, 0x80, sc.work_text, "Subj:");
350
	WriteText (45, lt_y+44, 0x80, sc.work_text, #subj);
347
	WriteText (45, lt_y+44, 0x80, sc.work_text, #subj);
351
}
348
}
Line 352... Line -...
352
 
-
 
353
 
-
 
354
void InitTWB() {
-
 
355
	WB1.list.SetSizes(0, mail_list.y+mail_list.h+LIST_INFO_H+1, Form.cwidth - scroll_wv.size_x - 1, 
-
 
356
		Form.cheight - mail_list.y - mail_list.h - LIST_INFO_H - 1 - status_bar_h, 12);
-
 
357
	WB1.list.column_max = WB1.list.w - 30 / 6;
-
 
358
	WB1.list.visible = WB1.list.h / WB1.list.item_h;
-
 
359
	DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, WB1.list.h);
-
 
360
	WB1.list.first = WB1.list.count = 0;
-
 
361
}
-
 
362
 
349
 
363
 
-
 
364
void DrawLetter() {
350
 
365
	WB1.ParseHtml(mdata, strlen(mdata));
351
void DrawLetter() {
366
	WB1.DrawPage();
352
	//DrawTextLines();
Line 367... Line 353...
367
	DrawRectangle(scroll_wv.start_x, scroll_wv.start_y, scroll_wv.size_x, scroll_wv.size_y-1, 0xFFFfff);
353
	DrawRectangle(scroll_wv.start_x, scroll_wv.start_y, scroll_wv.size_x, scroll_wv.size_y-1, 0xFFFfff);
368
}
354
}
Line 416... Line 402...
416
   strcpyb(listbuffer, #mailsize1, #search_num, "\x0d");
402
   strcpyb(listbuffer, #mailsize1, #search_num, "\x0d");
417
   return atoi(#mailsize1); 
403
   return atoi(#mailsize1);
418
}
404
}
Line -... Line 405...
-
 
405
 
419
 
406
 
420
 
407
/*
421
void EventClickLink() {
408
void EventClickLink() {
422
	RunProgram("/sys/network/WebView", links.active_url);	
409
	RunProgram("/sys/network/WebView", links.active_url);
-
 
410
}
423
}
411
*/